/* ===== profile.css — styles for the profile page ===== */

body.profile-body {
  min-height: 100vh;
  background: radial-gradient(
    circle at 50% 0%,
    var(--black-2) 0%,
    var(--black) 60%
  );
}

/* Keep the navbar solid on this page (it's short, rarely scrolled) */
header#site-header {
  background: rgba(10, 10, 11, 0.88) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--gold-dim) !important;
}

.nav-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--white);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 9px 16px;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.nav-logout-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.nav-logout-btn i {
  color: var(--gold);
}

.profile-main {
  padding: 130px 24px 80px;
  max-width: 100vw;
}

/* ---------- checking / gate screens ---------- */
.profile-screen {
  display: none;
}
.profile-screen.active {
  display: block;
}

#profileCheckingScreen {
  text-align: center;
  padding-top: 60px;
  color: var(--muted);
  font-size: 0.85rem;
}
.profile-loader {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: profileSpin 0.8s linear infinite;
}
@keyframes profileSpin {
  to {
    transform: rotate(360deg);
  }
}

.auth-gate-card {
  max-width: 420px;
  margin: 40px auto 0;
  text-align: center;
  padding: 44px 30px;
  background: var(--black-soft);
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
}
.auth-gate-icon {
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 14px;
}
.auth-gate-card h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 8px;
}
.auth-gate-card p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 22px;
}

/* ---------- profile content ---------- */
.profile-header {
  margin-bottom: 30px;
}
.profile-header .section-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--white);
  margin-top: 6px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 26px;
  align-items: start;
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  padding: 28px;
  backdrop-filter: blur(10px);
}

/* ---------- account card ---------- */
.avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gold-dim);
}
.avatar-circle {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}
.account-name {
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
}
.account-email {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
  word-break: break-all;
}

#profileForm .form-group {
  margin-bottom: 16px;
}
#profileForm label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 7px;
}
#profileForm label i {
  color: var(--gold);
  font-size: 0.75rem;
}
#profileForm input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  color: var(--white);
  font-size: 0.85rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#profileForm input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.error-message {
  background: rgba(229, 72, 77, 0.1);
  border: 1px solid rgba(229, 72, 77, 0.4);
  color: #e5484d;
  font-size: 0.78rem;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.success-message {
  background: rgba(90, 212, 130, 0.1);
  border: 1px solid rgba(90, 212, 130, 0.4);
  color: #5ad482;
  font-size: 0.78rem;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}

#profileForm button {
  width: 100%;
  text-align: center;
  border: none;
}
#profileForm button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- bookings card ---------- */
.bookings-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 20px;
}
.bookings-title i {
  color: var(--gold);
}

.bookings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bookings-group {
  margin-bottom: 26px;
}
.bookings-group:last-child {
  margin-bottom: 0;
}
.bookings-group-title {
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold-dim);
}
.bookings-empty-inline {
  color: var(--muted);
  font-size: 0.82rem;
  padding: 10px 2px;
}
.bookings-empty-inline a {
  color: var(--gold);
  text-decoration: underline;
  margin-left: 4px;
}

.booking-calendar-btn,
.booking-rebook-btn,
.booking-review-btn,
.booking-reassign-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  margin-right: 8px;
  font-size: 0.72rem;
  color: var(--gold-soft);
  border: 1px solid var(--gold-dim);
  padding: 5px 12px;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
  background: transparent;
}
.booking-calendar-btn:hover,
.booking-rebook-btn:hover,
.booking-review-btn:hover,
.booking-reassign-btn:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 90, 0.08);
}

.reassign-barber-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
  max-height: 240px;
  overflow-y: auto;
}
.reassign-option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gold-dim);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.reassign-option-btn:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 90, 0.08);
}
.reassign-loading {
  color: var(--muted);
  font-size: 0.82rem;
  padding: 10px 0;
}

.booking-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  padding: 16px 18px;
}
.booking-card .booking-main {
  min-width: 0;
}
.booking-service {
  color: var(--white);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
}
.booking-price {
  color: var(--gold);
  font-weight: 500;
  font-size: 0.8rem;
}
.booking-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}
.booking-meta i {
  color: var(--gold);
  width: 14px;
  margin-right: 6px;
}
.booking-countdown {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(90, 212, 130, 0.1);
  border: 1px solid rgba(90, 212, 130, 0.3);
  color: #5ad482;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.booking-countdown i {
  font-size: 0.65rem;
}
.booking-submitted {
  margin-top: 8px;
  color: var(--muted-2, var(--muted));
  font-size: 0.68rem;
  font-style: italic;
  opacity: 0.75;
}
.booking-submitted i {
  color: var(--gold);
  width: 12px;
  margin-right: 5px;
}

.status-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.status-badge.pending {
  background: rgba(240, 200, 60, 0.15);
  color: #f0c83c;
  border: 1px solid rgba(240, 200, 60, 0.35);
}
.status-badge.confirmed {
  background: rgba(90, 212, 130, 0.12);
  color: #5ad482;
  border: 1px solid rgba(90, 212, 130, 0.35);
}
.status-badge.completed {
  background: rgba(76, 156, 235, 0.12);
  color: #4c9ceb;
  border: 1px solid rgba(76, 156, 235, 0.35);
}
.status-badge.missed {
  background: rgba(229, 72, 77, 0.12);
  color: #e5484d;
  border: 1px solid rgba(229, 72, 77, 0.35);
}
.booking-overdue-note {
  margin-top: 8px;
  color: #e5484d;
  font-size: 0.7rem;
  line-height: 1.5;
}
.status-badge.cancelled {
  background: rgba(229, 72, 77, 0.1);
  color: #e5484d;
  border: 1px solid rgba(229, 72, 77, 0.35);
}

.booking-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.booking-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold-soft);
  font-size: 0.68rem;
  letter-spacing: 0.4px;
  padding: 6px 12px;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.booking-edit-btn:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 90, 0.08);
}
.booking-cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(229, 72, 77, 0.35);
  color: #e5484d;
  font-size: 0.68rem;
  letter-spacing: 0.4px;
  padding: 6px 12px;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.booking-cancel-btn:hover {
  border-color: #e5484d;
  background: rgba(229, 72, 77, 0.08);
}

.bookings-empty {
  text-align: center;
  padding: 40px 10px;
  color: var(--muted);
}
.bookings-empty i {
  font-size: 1.8rem;
  color: var(--gold-dim);
  margin-bottom: 12px;
  display: block;
}
.bookings-empty p {
  margin-bottom: 18px;
  font-size: 0.85rem;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-main {
    padding: 120px 16px 60px;
  }
  .nav-menu {
    display: none;
  }
}

@media (max-width: 480px) {
  .booking-card {
    flex-direction: column;
  }
}

/* ---------- nav actions (logout + delete account) ---------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(229, 72, 77, 0.4);
  color: #e5484d;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 9px 16px;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav-delete-btn:hover {
  border-color: #e5484d;
  background: rgba(229, 72, 77, 0.08);
}

@media (max-width: 560px) {
  .nav-delete-btn span,
  .nav-delete-btn {
    font-size: 0.68rem;
    padding: 8px 10px;
  }
}

/* ---------- delete-account confirmation modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}
.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--black-soft);
  border: 1px solid rgba(229, 72, 77, 0.35);
  border-radius: 14px;
  padding: 32px 28px;
  text-align: center;
  animation: modalRiseIn 0.28s ease;
}
@keyframes modalRiseIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.modal-icon {
  font-size: 1.6rem;
  color: #e5484d;
  margin-bottom: 12px;
}
.modal-card h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 8px;
}
.modal-card p {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 20px;
  line-height: 1.6;
}
.modal-card .form-group {
  text-align: left;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.modal-actions .button {
  flex: 1;
  text-align: center;
}

.liquid-glass-danger {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f2585d 0%, #e5484d 55%, #c93840 100%);
  border: none;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(229, 72, 77, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.liquid-glass-danger::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.12) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.35) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.liquid-glass-danger::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.6s ease;
}
.liquid-glass-danger span {
  position: relative;
  z-index: 1;
}
.liquid-glass-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(229, 72, 77, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.liquid-glass-danger:hover::after {
  left: 130%;
}
.liquid-glass-danger[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
