/* ============================================
   GoCheckin Rewards – Profile Overview Page
   ============================================ */

/* ---- Slide-in overlay (right → left) ---- */
.profile-page {
  position: absolute;
  inset: 0;
  z-index: var(--z-index-overlay);
  background: var(--gradient-header);
  transform: translateX(100%);
  transition: var(--transition-slide);
  will-change: transform;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.profile-page.open {
  transform: translateX(0);
}

/* ---- Fixed top area (non-scrollable) ---- */
.profile-fixed {
  flex-shrink: 0;
}

/* ---- Header row: back | avatar | settings ---- */
.profile-header {
  padding: var(--space-10) var(--space-5) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Glass buttons */
.profile-glass-btn {
  width: var(--space-8);
  height: var(--space-8);
  border-radius: var(--radius-3xl);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  background: var(--color-button-glass);
  box-shadow: var(--shadow-glass-btn);
  color: var(--color-content-main);
  transition: var(--transition-fade);
  backdrop-filter: var(--backdrop-blur-xs);
  -webkit-backdrop-filter: var(--backdrop-blur-xs);
}

.profile-glass-btn:hover { opacity: 0.8; }

/* Avatar circle */
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--color-on-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Name + meta ---- */
.profile-identity {
  padding: var(--space-5) var(--space-5) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.profile-name {
  font-size: var(--font-size-m);
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
  line-height: 28px;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.profile-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-s);
  color: var(--color-content-main);
  line-height: var(--line-height-s);
}

.profile-meta-row svg {
  width: var(--space-5);
  height: var(--space-5);
  flex-shrink: 0;
}

/* ---- Tab chips (horizontal scroll) ---- */
.profile-tabs-wrap {
  margin-top: var(--space-5);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 0 var(--space-5);
  -webkit-overflow-scrolling: touch;
}

.profile-tabs-wrap::-webkit-scrollbar { display: none; }

.profile-tabs {
  display: flex;
  gap: var(--space-3);
  white-space: nowrap;
  width: max-content;
}

.profile-tab {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-medium);
  background: transparent;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: var(--line-height-m);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.profile-tab.active {
  background: var(--color-content-main);
  color: var(--color-on-primary);
  border-color: transparent;
}

/* ---- Scrollable content area ---- */
.profile-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: var(--space-6) var(--space-5) 100px;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  -webkit-overflow-scrolling: touch;
}

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

/* Section header row */
.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

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

.profile-view-all {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: var(--font-size-xs);
  color: var(--color-content-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-family);
  line-height: var(--line-height-m);
}

.profile-view-all svg {
  width: 20px;
  height: 20px;
  color: var(--color-content-muted);
}

/* ---- Points & Rewards ---- */

/* Wrapper creates space for the overlapping badge */
.profile-rewards-wrap {
  position: relative;
  padding-top: var(--space-4);
}

/* Gold gradient badge — overlaps top-left of card */
.profile-claim-badge {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #f0c44a 0%, #d79d1e 100%);
  color: var(--color-on-primary);
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.03em;
  line-height: var(--line-height-2xs);
  padding: 6px var(--space-5) 6px var(--space-4);
  border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 0;
  z-index: 1;
}

.profile-claim-badge img {
  width: var(--space-4);
  height: var(--space-4);
  flex-shrink: 0;
}

/* Rewards card — yellow gradient, bordered */
.profile-rewards-card {
  border-radius: var(--radius-3xl);
  overflow: hidden;
  border: 1px solid rgba(219, 187, 95, 0.3);
  background: radial-gradient(ellipse 100% 85% at 50% 112%, #fff4d5 0%, #ffe69d 100%);
}

.profile-rewards-card-body {
  display: flex;
  align-items: flex-start;
  padding: var(--space-5) 0 0;
}

.profile-rewards-info {
  flex: 1;
  padding: 0 0 var(--space-3) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.profile-rewards-store {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
  line-height: var(--line-height-xl);
}

.profile-rewards-label {
  font-size: var(--font-size-s);
  color: var(--color-content-main);
  opacity: 0.5;
  line-height: var(--line-height-s);
}

.profile-rewards-pts-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.profile-rewards-pts-num {
  font-size: var(--font-size-l);
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
  line-height: var(--line-height-2xl);
}

.profile-rewards-pts-unit {
  font-size: 15px;
  font-weight: var(--font-weight-bold);
  color: var(--color-content-main);
}

.profile-rewards-pts-dollar {
  font-size: var(--font-size-s);
  font-weight: var(--font-weight-regular);
  color: var(--color-content-main);
  line-height: var(--line-height-s);
}

.profile-rewards-gem {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  margin-right: var(--space-5);
}

.profile-rewards-gem img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Yellow footer bar */
.profile-rewards-footer {
  background: var(--color-rewards-footer);
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.profile-rewards-options {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-s);
  color: var(--color-content-main);
  line-height: var(--line-height-s);
  flex: 1;
}

.profile-rewards-options svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-redeem-now {
  background: var(--color-white-pure);
  color: #1b1c20;
  border: none;
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-5);
  height: var(--space-7);
  font-family: var(--font-family);
  font-size: var(--font-size-s);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  white-space: nowrap;
  line-height: var(--line-height-s);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  transition: var(--transition-fade);
  flex-shrink: 0;
}

.btn-redeem-now:hover { opacity: 0.85; }

/* ---- Your Next Visit ---- */
.profile-next-card {
  background: var(--color-on-primary);
  border-radius: var(--radius-3xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.profile-next-time {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: var(--line-height-l);
}

.profile-next-appt {
  background: var(--color-appointment-bg);
  border-radius: var(--radius-l);
  padding: var(--space-3);
  display: flex;
  align-items: stretch;
  gap: var(--space-3);
}

.profile-next-appt-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--color-appointment-accent);
  flex-shrink: 0;
}

.profile-next-appt-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.profile-next-appt-name {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-appointment-accent);
  line-height: var(--line-height-m);
}

.profile-next-appt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-s);
  color: var(--color-appointment-accent);
  line-height: var(--line-height-s);
}

.profile-next-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-appointment-accent);
  flex-shrink: 0;
}

/* Action buttons row */
.profile-actions {
  display: flex;
  gap: var(--space-3);
}

.btn-profile-dir,
.btn-profile-detail {
  flex: 1;
  padding: var(--space-3) 20px;
  border-radius: var(--radius-full);
  border: none;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  line-height: var(--line-height-m);
  transition: var(--transition-fade);
}

.btn-profile-dir {
  background: rgba(218, 218, 221, 0.5);
  color: var(--color-content-main);
}

.btn-profile-detail {
  background: var(--color-content-main);
  color: var(--color-on-primary);
}

.btn-profile-dir svg,
.btn-profile-detail svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-profile-dir:hover,
.btn-profile-detail:hover { opacity: 0.8; }

/* ---- Your Favorites ---- */
.profile-fav-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--space-5));
  padding: 0 var(--space-5);
  -webkit-overflow-scrolling: touch;
}

.profile-fav-scroll::-webkit-scrollbar { display: none; }

.profile-fav-row {
  display: flex;
  gap: var(--space-5);
  width: max-content;
  padding-bottom: var(--space-2);
}

.profile-fav-card {
  width: 280px;
  background: var(--color-on-primary);
  border-radius: var(--radius-3xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex-shrink: 0;
}

.profile-fav-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-weak);
}

.profile-fav-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-l);
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e0b0f0, #c880e8);
}

.profile-fav-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.profile-fav-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: var(--line-height-l);
}

.profile-fav-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.profile-fav-rating-inner {
  display: flex;
  align-items: center;
  gap: 2px;
}

.profile-fav-star {
  width: var(--space-5);
  height: var(--space-5);
  object-fit: contain;
  display: block;
}

.profile-fav-rating-val {
  font-size: var(--font-size-s);
  color: var(--color-content-main);
  line-height: var(--line-height-s);
}

.profile-fav-rating-count {
  font-size: var(--font-size-s);
  color: var(--color-content-main);
  opacity: 0.6;
  line-height: var(--line-height-s);
}

.profile-fav-stats {
  display: flex;
  gap: var(--space-7);
}

.profile-fav-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.profile-fav-stat-label {
  font-size: 8px;
  font-weight: var(--font-weight-semibold);
  color: #bdbdc2;
  line-height: var(--line-height-3xs);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.profile-fav-stat-value {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: var(--line-height-m);
}

.btn-book-again {
  width: 100%;
  height: var(--space-8);
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: var(--transition-fade);
  line-height: var(--line-height-m);
}

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