/* public/css/style.css — AgendaSalon: Refined Dark Luxury */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ───────────────────────────────────────────────── */
:root {
  --bg:       #0f0d0a;
  --surface:  #17140f;
  --card:     #1e1a13;
  --border:   #2e2820;
  --gold:     #c9a84c;
  --gold-dim: #8a6f2e;
  --text:     #e8dfd0;
  --muted:    #7a6f60;
  --success:  #4ade80;
  --danger:   #f87171;
  --radius:   12px;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Grain overlay ───────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
}
.site-header.compact { padding: 1rem 2rem; }
.header-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo-mark {
  font-size: 1.4rem;
  color: var(--gold);
  line-height: 1;
}
.salon-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
}
.salon-sub {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: auto;
}

/* ── Booking Container ───────────────────────────────────────── */
.booking-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Steps ───────────────────────────────────────────────────── */
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  animation: fadeUp .35s ease both;
}
.step.hidden { display: none !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}
.step-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: var(--gold-dim);
  line-height: 1;
  flex-shrink: 0;
  opacity: .6;
}
.step-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.1;
}
.step-desc {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .2rem;
}

/* ── Form Fields ─────────────────────────────────────────────── */
.form-fields { display: flex; flex-direction: column; gap: .4rem; }

.field-group { margin-bottom: 1rem; }
.field-group label {
  display: block;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .4rem;
}
.field-group input {
  width: 100%;
  padding: .8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  transition: border-color .2s;
}
.field-group input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.08);
}
.optional { color: var(--muted); font-size: .7rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-next {
  display: block;
  width: 100%;
  padding: .9rem 1.5rem;
  background: var(--gold);
  color: #1a1209;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: .03em;
  transition: opacity .2s, transform .1s;
  margin-top: 1.2rem;
}
.btn-next:hover { opacity: .88; }
.btn-next:active { transform: scale(.98); }

.btn-confirm {
  display: block;
  width: 100%;
  padding: 1.1rem;
  background: linear-gradient(135deg, #c9a84c, #e8c96a);
  color: #1a1209;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 1.5rem;
  transition: opacity .2s;
  position: relative;
}
.btn-confirm:hover { opacity: .9; }
.btn-confirm .btn-loading { color: #1a1209; }

/* ── Services Grid ───────────────────────────────────────────── */
.services-grid, .professionals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.service-card, .professional-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  position: relative;
  overflow: hidden;
}
.service-card::before, .professional-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,.04), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.service-card:hover, .professional-card:hover {
  border-color: var(--gold-dim);
  background: #221d14;
  transform: translateY(-2px);
}
.service-card:hover::before, .professional-card:hover::before { opacity: 1; }

.service-card.selected, .professional-card.selected {
  border-color: var(--gold);
  background: #221d14;
}
.service-card.selected::after, .professional-card.selected::after {
  content: '✓';
  position: absolute;
  top: .6rem;
  right: .8rem;
  color: var(--gold);
  font-size: .85rem;
  font-weight: 700;
}

.card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: .3rem;
}
.card-detail {
  font-size: .8rem;
  color: var(--muted);
}
.card-price {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 500;
  margin-top: .5rem;
}

/* ── Professional Card ───────────────────────────────────────── */
.professional-card { display: flex; align-items: center; gap: 1rem; }
.prof-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--bg);
  flex-shrink: 0;
}

/* ── Calendar ────────────────────────────────────────────────── */
.calendar-wrapper { margin-bottom: 1.5rem; }
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.month-label {
  flex: 1;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  text-transform: capitalize;
  color: var(--text);
}
.cal-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cal-btn:hover { background: var(--border); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day-label {
  text-align: center;
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .5rem 0;
}
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  border: 1px solid transparent;
}
.cal-day:hover:not(.disabled):not(.empty) { background: var(--border); }
.cal-day.available { color: var(--text); cursor: pointer; }
.cal-day.available:hover { border-color: var(--gold-dim); }
.cal-day.selected { background: var(--gold); color: #1a1209; font-weight: 600; }
.cal-day.disabled { color: var(--muted); cursor: default; opacity: .35; }
.cal-day.today { border-color: var(--gold-dim); }
.cal-day.empty { cursor: default; }
.cal-day.has-slots { position: relative; }
.cal-day.has-slots::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

/* ── Time Slots ──────────────────────────────────────────────── */
.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  min-height: 60px;
  align-items: flex-start;
}
.time-hint { color: var(--muted); font-size: .9rem; width: 100%; }

.time-slot {
  padding: .5rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .9rem;
  cursor: pointer;
  transition: all .15s;
  color: var(--text);
}
.time-slot:hover { border-color: var(--gold-dim); background: #221d14; }
.time-slot.selected { background: var(--gold); color: #1a1209; border-color: var(--gold); font-weight: 600; }

/* ── Summary Card ────────────────────────────────────────────── */
.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .9rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-label {
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.summary-value { font-size: .95rem; color: var(--text); text-align: right; }
.summary-value.price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--gold);
}
.terms-note {
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
}

/* ── Payment Page ────────────────────────────────────────────── */
.payment-page .payment-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.payment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
}
.pay-state { text-align: center; }
.pay-state.hidden { display: none !important; }

.pix-badge {
  display: inline-block;
  background: #00875A;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: .25rem .7rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.pay-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}
.pay-title.success { color: var(--success); }
.pay-title.expired { color: var(--danger); }

.booking-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.booking-summary .sum-row {
  display: flex;
  justify-content: space-between;
  padding: .4rem 0;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
}
.booking-summary .sum-row:last-child { border: none; }
.booking-summary .sum-label { color: var(--muted); }

.pix-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.qr-section { margin-bottom: 1.5rem; }
.qr-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: .75rem;
}
.qr-placeholder {
  width: 180px; height: 180px;
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--muted);
  font-size: .85rem;
  gap: .3rem;
}
.qr-placeholder small { font-size: .7rem; }
.qr-hint { font-size: .8rem; color: var(--muted); }

.cc-label { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }
.cc-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.cc-code {
  flex: 1;
  padding: .75rem 1rem;
  font-size: .7rem;
  color: var(--muted);
  word-break: break-all;
  text-align: left;
  line-height: 1.4;
  font-family: monospace;
  overflow: hidden;
}
.btn-copy {
  background: var(--gold);
  color: #1a1209;
  border: none;
  padding: 0 1rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
}
.btn-copy:hover { opacity: .85; }

.timer-section { margin-bottom: 1.5rem; }
.timer-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: .5rem;
}
.timer-fill {
  height: 100%;
  background: var(--gold);
  width: 100%;
  transition: width 1s linear;
  border-radius: 2px;
}
.timer-text { font-size: .8rem; color: var(--muted); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.status-badge.waiting {
  background: rgba(201,168,76,.1);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,.2);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}

/* ── Success / Expire Icons ──────────────────────────────────── */
.success-icon, .expired-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1.5rem;
}
.success-icon { background: rgba(74,222,128,.12); color: var(--success); }
.expired-icon { background: rgba(248,113,113,.12); color: var(--danger); }
.success-msg { color: var(--muted); margin-bottom: 1.5rem; }

.confirmed-details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}

/* ── Dev simulation button ───────────────────────────────────── */
.btn-simulate {
  background: transparent;
  border: 1px dashed var(--muted);
  color: var(--muted);
  padding: .5rem 1rem;
  border-radius: 6px;
  font-size: .8rem;
  cursor: pointer;
  margin-top: .5rem;
  transition: all .15s;
}
.btn-simulate:hover { border-color: var(--gold); color: var(--gold); }

/* ── Loading Spinner ─────────────────────────────────────────── */
.loading-spinner {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--muted);
  padding: 1rem 0;
  font-size: .9rem;
}
.loading-spinner span {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.pix-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: .75rem 1.2rem;
  border-radius: 8px;
  font-size: .875rem;
  max-width: 300px;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  animation: slideIn .25s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: .75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.site-footer strong { color: var(--gold-dim); }

/* ── Utility ─────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 520px) {
  .step { padding: 1.5rem 1rem; }
  .services-grid, .professionals-grid { grid-template-columns: 1fr; }
  .payment-card { padding: 1.5rem 1rem; }
  .pix-amount { font-size: 2rem; }
  .salon-sub { display: none; }
}


/* Animação de entrada */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

.success-screen {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  max-width: 450px;
  margin: 20px auto;
}

.success-icon {
  font-size: 64px;
  margin-bottom: 20px;
  display: inline-block;
  background: rgba(74, 222, 128, 0.2);
  width: 100px;
  height: 100px;
  line-height: 100px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.success-screen h2 {
  color: #4ade80;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.success-details {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin: 25px 0;
  text-align: left;
  border-left: 4px solid #4ade80;
}

.success-details p {
  margin: 8px 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.success-details strong {
  color: #94a3b8;
  font-weight: 500;
  margin-right: 5px;
}

.success-note {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 30px;
  font-style: italic;
}

/* Botão Estilizado */
.btn-success-finish {
    background: #c9a84c;
    color: #000000;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px #221d14;
}

.btn-success-finish:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-whatsapp {
  display: inline-block;
  margin: 1rem 0 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #25d366;
  color: #000000;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  width: 100%;
}
.btn-whatsapp:hover {
  background: #1da851;
}


.pay-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.pay-option:has(input:checked) {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
}

.pay-info-status {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  padding: 10px;
  border-radius: 6px;
}

