/* ============================================
   GoCheckin Rewards – Appointment Page
   ============================================ */

/* Override page-screen background with gradient */
#page-appointment {
  background: var(--gradient-header, linear-gradient(180deg, #f9d4e8 0%, #ead0f5 45%, #f3f0f4 100%));
}

/* ---- Header ---- */
.appt-header {
  padding: 56px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.appt-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.appt-title {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
  line-height: 40px;
}

/* Notification button — glass style matching app */
.appt-notif-btn {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 16px 0 rgba(102, 102, 102, 0.15),
    inset 0 1px 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 16px 16px 0 rgba(123, 113, 130, 0.1);
  color: var(--color-content-main);
  transition: opacity 0.15s;
}

.appt-notif-btn:hover { opacity: 0.8; }
.appt-notif-btn svg  { color: var(--color-content-main); }

/* ---- Tab bar ---- */
/* White pill with shadow — active tab is purple (#a528e3) */
.appt-tabs {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--color-button-glass, rgba(255, 255, 255, 0.2));
  border-radius: 24px;
  padding: 4px;
  box-shadow: 0px 0px 16px 0px rgba(102, 102, 102, 0.15),
              inset 0px 1px 2px 0px rgba(255, 255, 255, 0.5),
              inset 0px 16px 16px 0px rgba(123, 113, 130, 0.1);
  backdrop-filter: var(--backdrop-blur-xs);
  -webkit-backdrop-filter: var(--backdrop-blur-xs);
}

.appt-tab {
  flex: 1;
  padding: 8px 16px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  line-height: 20px;
  text-align: center;
  background: transparent;
  color: var(--color-content-main);
  transition: background 0.2s;
}

.appt-tab.active {
  background: var(--color-on-primary, #fcfcfc);
  color: var(--color-content-main);
  padding: 10px 16px;
}

/* ---- Scroll area ---- */
.appt-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.appt-scroll::-webkit-scrollbar { display: none; }

/* ---- Tab content ---- */
.appt-tab-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.appt-tab-hidden { display: none; }

/* ---- Appointment card ---- */
.appt-card {
  background: var(--color-on-primary, #fcfcfc);
  border-radius: 24px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0px 1px 2px 0px rgba(113, 113, 113, 0.1);
  cursor: pointer;
  transition: opacity 0.15s;
}

.appt-card:hover { opacity: 0.9; }

/* Top row: datetime + badge */
.appt-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.appt-datetime {
  display: flex;
  align-items: center;
  gap: 8px;
}

.appt-time,
.appt-date {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 20px;
  white-space: nowrap;
}

/* Status badge */
.appt-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  line-height: 14px;
  white-space: nowrap;
}

.appt-badge--confirmed {
  background: #e9f6ec;
  border: 1px solid rgba(40, 161, 70, 0.2);
  color: #28a146;
}

.appt-badge--completed {
  background: #e9effc;
  border: 1px solid rgba(31, 92, 221, 0.2);
  color: #1f5cdd;
}

.appt-badge--cancelled {
  background: #fbeaea;
  border: 1px solid rgba(220, 45, 45, 0.2);
  color: #dc2d2d;
}

.appt-badge--expired {
  background: #fbf0e6;
  border: 1px solid rgba(220, 130, 45, 0.2);
  color: #dc822d;
}

/* History card action buttons */
.appt-history-btns {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-appt-book-again,
.btn-appt-rate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border: none;
  border-radius: 99px;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-m);
  cursor: pointer;
  transition: var(--transition-fade);
  white-space: nowrap;
}

.btn-appt-book-again {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.btn-appt-book-again svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-appt-rate {
  background: rgba(218, 218, 221, 0.5);
  color: var(--color-content-main);
  flex: 1;
}

.btn-appt-rate svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn-appt-book-again:hover,
.btn-appt-rate:hover { opacity: 0.85; }

/* Service block */
.appt-service-block {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
}

.appt-service-bar {
  width: 4px;
  border-radius: 2px;
  flex-shrink: 0;
}

.appt-service-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.appt-service-name {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  line-height: 20px;
  white-space: nowrap;
}

.appt-service-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: var(--font-weight-regular);
  line-height: 16px;
}

.appt-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.6;
}

/* ---- Cancel success banner ---- */
.appt-cancel-success-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: linear-gradient(to top, #ffffff, #e9f6ec);
  border-radius: var(--radius-3xl);
  box-shadow: 0px 16px 24px 0px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-height: 0;
  padding: 0 var(--space-4);
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease, margin 0.35s ease;
}

.appt-cancel-success-banner.visible {
  max-height: 80px;
  padding: var(--space-4);
  margin: 0 0 var(--space-2);
  opacity: 1;
  pointer-events: auto;
}

.appt-cancel-success-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #28a146;
}

.appt-cancel-success-text {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: #28a146;
  line-height: var(--line-height-m);
}

/* Bottom spacer for nav bar */
.appt-bottom-spacer {
  height: calc(var(--nav-height, 72px) + 8px);
  flex-shrink: 0;
}
