/* ── WTP Appointments — Frontend ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --wtp-blue:      #1a4b7a;
  --wtp-blue-dark: #123557;
  --wtp-gold:      #c8962a;
  --wtp-gold-lt:   #f0ddb0;
  --wtp-light:     #f7f4ef;
  --wtp-border:    #ddd5c8;
  --wtp-text:      #1e1e1e;
  --wtp-muted:     #5a5a5a;
  --wtp-green:     #2d7a4a;
  --wtp-green-lt:  #e4f5ec;
  --wtp-red:       #c0392b;
  --wtp-radius:    10px;
  --wtp-shadow:    0 3px 16px rgba(0,0,0,0.09);
  --wtp-font-body: 'Source Sans 3', system-ui, sans-serif;
  --wtp-font-head: 'Lora', Georgia, serif;
}

/* ── Base wrapper ────────────────────────────────────────────────── */
#wtp-booking-app,
#wtp-dashboard-app {
  font-family: var(--wtp-font-body);
  font-size: 1rem;
  color: var(--wtp-text);
  max-width: 940px;
  margin: 0 auto;
  padding: .5rem 0 2rem;
}

.wtp-hidden { display: none !important; }

/* ── Section headings ────────────────────────────────────────────── */
.wtp-step-title,
.wtp-dash-title {
  font-family: var(--wtp-font-head);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--wtp-blue);
  margin: 0 0 .3rem;
  padding-bottom: .45rem;
  border-bottom: 3px solid var(--wtp-gold);
  display: inline-block;
  line-height: 1.2;
}

.wtp-step-sub,
.wtp-dash-sub {
  font-size: 1.05rem;
  color: var(--wtp-muted);
  font-style: italic;
  margin: .4rem 0 1.6rem;
}

/* ── Back button ─────────────────────────────────────────────────── */
.wtp-back-btn {
  background: none;
  border: none;
  color: var(--wtp-blue);
  cursor: pointer;
  font-family: var(--wtp-font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0;
  margin-bottom: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  text-decoration: none;
  letter-spacing: .01em;
}
.wtp-back-btn:hover { color: var(--wtp-gold); }

/* ── Faculty Grid ────────────────────────────────────────────────── */
.wtp-faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.wtp-faculty-card {
  background: #fff;
  border: 2px solid var(--wtp-border);
  border-radius: var(--wtp-radius);
  padding: 1.6rem 1rem 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, transform .18s, box-shadow .2s;
  box-shadow: var(--wtp-shadow);
}
.wtp-faculty-card:hover {
  border-color: var(--wtp-gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}
.wtp-faculty-card.wtp-no-slots {
  opacity: .5;
  cursor: not-allowed;
}
.wtp-faculty-card.wtp-no-slots:hover {
  transform: none;
  border-color: var(--wtp-border);
  box-shadow: var(--wtp-shadow);
}

.wtp-faculty-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--wtp-gold);
  margin-bottom: .9rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.wtp-faculty-initial {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--wtp-blue);
  color: #fff;
  font-family: var(--wtp-font-head);
  font-size: 2.2rem;
  line-height: 90px;
  text-align: center;
  margin: 0 auto .9rem;
  border: 3px solid var(--wtp-gold);
}

.wtp-faculty-card h3 {
  font-family: var(--wtp-font-head);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 .3rem;
  color: var(--wtp-blue);
  line-height: 1.25;
}
.wtp-faculty-card p {
  font-size: .88rem;
  color: var(--wtp-muted);
  margin: 0 0 .75rem;
  font-style: italic;
  line-height: 1.4;
}
.wtp-slots-badge {
  display: inline-block;
  font-family: var(--wtp-font-body);
  font-size: .8rem;
  font-weight: 600;
  background: var(--wtp-light);
  border: 1.5px solid var(--wtp-border);
  border-radius: 20px;
  padding: .2rem .75rem;
  color: var(--wtp-muted);
  letter-spacing: .01em;
}
.wtp-slots-badge.available {
  background: var(--wtp-green-lt);
  border-color: var(--wtp-green);
  color: var(--wtp-green);
}

/* ── Time Slot Picker ────────────────────────────────────────────── */
.wtp-date-group { margin-bottom: 2rem; }

.wtp-date-label {
  font-family: var(--wtp-font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--wtp-blue);
  margin-bottom: .85rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--wtp-border);
}

.wtp-slots-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.wtp-slot-btn {
  background: #fff;
  border: 2px solid var(--wtp-blue);
  border-radius: var(--wtp-radius);
  padding: .55rem 1.1rem;
  cursor: pointer;
  font-family: var(--wtp-font-body);
  font-size: .95rem;
  font-weight: 600;
  color: var(--wtp-blue);
  transition: all .15s;
  letter-spacing: .01em;
}
.wtp-slot-btn:hover {
  background: var(--wtp-blue);
  color: #fff;
  transform: translateY(-1px);
}
.wtp-slot-btn.selected {
  background: var(--wtp-blue);
  color: #fff;
  box-shadow: 0 3px 10px rgba(26,75,122,.35);
}
.wtp-no-slots-msg {
  color: var(--wtp-muted);
  font-style: italic;
  font-size: 1rem;
  padding: 1rem 0;
}

/* ── Booking Form ────────────────────────────────────────────────── */
#wtp-booking-form {
  max-width: 540px;
  margin-top: 1.2rem;
}

.wtp-field { margin-bottom: 1.3rem; }

.wtp-field label {
  display: block;
  font-family: var(--wtp-font-body);
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .4rem;
  color: var(--wtp-blue);
  letter-spacing: .01em;
}
.wtp-field .req { color: var(--wtp-red); }

.wtp-field input,
.wtp-field select,
.wtp-field textarea {
  width: 100%;
  border: 2px solid var(--wtp-border);
  border-radius: var(--wtp-radius);
  padding: .65rem .85rem;
  font-family: var(--wtp-font-body);
  font-size: 1rem;
  color: var(--wtp-text);
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.wtp-field input:focus,
.wtp-field select:focus,
.wtp-field textarea:focus {
  border-color: var(--wtp-blue);
  box-shadow: 0 0 0 3px rgba(26,75,122,.12);
  outline: none;
}

.wtp-submit-btn {
  background: var(--wtp-blue);
  color: #fff;
  border: none;
  border-radius: var(--wtp-radius);
  padding: .85rem 2.2rem;
  font-family: var(--wtp-font-body);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .03em;
  transition: background .2s, transform .15s;
  margin-top: .5rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.wtp-submit-btn:hover {
  background: var(--wtp-gold);
  transform: translateY(-1px);
}
.wtp-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.wtp-error {
  background: #fdecea;
  border: 1.5px solid var(--wtp-red);
  border-radius: var(--wtp-radius);
  padding: .7rem 1rem;
  color: var(--wtp-red);
  font-size: .95rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* ── Confirmation ────────────────────────────────────────────────── */
.wtp-confirmation {
  text-align: center;
  padding: 3.5rem 2.5rem;
  background: #fff;
  border-radius: var(--wtp-radius);
  box-shadow: var(--wtp-shadow);
  border-top: 5px solid var(--wtp-gold);
  max-width: 560px;
  margin: 0 auto;
}
.wtp-check {
  font-size: 4rem;
  color: var(--wtp-green);
  margin-bottom: .6rem;
  line-height: 1;
}
.wtp-confirmation h2 {
  font-family: var(--wtp-font-head);
  color: var(--wtp-blue);
  font-size: 2rem;
  margin: 0 0 .75rem;
}
.wtp-confirmation p {
  font-size: 1.05rem;
  color: var(--wtp-muted);
  line-height: 1.6;
  margin-bottom: .5rem;
}
.wtp-confirm-note {
  font-style: italic;
  font-size: .95rem;
  margin-top: .75rem;
}
.wtp-new-btn {
  margin-top: 1.4rem;
  background: none;
  border: 2px solid var(--wtp-blue);
  color: var(--wtp-blue);
  border-radius: var(--wtp-radius);
  padding: .65rem 1.6rem;
  cursor: pointer;
  font-family: var(--wtp-font-body);
  font-size: 1rem;
  font-weight: 600;
  transition: all .2s;
}
.wtp-new-btn:hover { background: var(--wtp-blue); color: #fff; }

/* ── Loading state ───────────────────────────────────────────────── */
.wtp-loading {
  color: var(--wtp-muted);
  font-style: italic;
  font-size: 1rem;
  padding: 2rem 0;
}

/* ── Dashboard Modal ─────────────────────────────────────────────── */
.wtp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.58);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wtp-modal {
  background: #fff;
  border-radius: var(--wtp-radius);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 2.2rem 2.5rem;
  position: relative;
  box-shadow: 0 12px 50px rgba(0,0,0,.28);
  border-top: 5px solid var(--wtp-gold);
}

.wtp-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--wtp-muted);
  transition: color .15s;
}
.wtp-modal-close:hover { color: var(--wtp-red); }

.wtp-modal-header {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-bottom: 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--wtp-border);
}
.wtp-modal-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--wtp-gold);
  flex-shrink: 0;
}
.wtp-modal-header h3 {
  font-family: var(--wtp-font-head);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 .25rem;
  color: var(--wtp-blue);
}
.wtp-modal-header p {
  margin: 0;
  color: var(--wtp-muted);
  font-style: italic;
  font-size: 1rem;
}

/* Slot rows inside modal */
.wtp-modal-slot {
  border: 1.5px solid var(--wtp-border);
  border-radius: var(--wtp-radius);
  padding: .9rem 1.2rem;
  margin-bottom: .7rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
}
.wtp-modal-slot.booked {
  background: #fdf8ee;
  border-color: var(--wtp-gold-lt);
  border-left: 4px solid var(--wtp-gold);
}
.wtp-modal-slot.open {
  background: #f2fbf6;
  border-color: #bde3cc;
  border-left: 4px solid var(--wtp-green);
}

.wtp-slot-time-col { min-width: 145px; flex-shrink: 0; }

.wtp-slot-time {
  font-family: var(--wtp-font-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--wtp-blue);
  display: block;
  margin-bottom: .18rem;
}
.wtp-slot-date-s {
  font-size: .88rem;
  color: var(--wtp-muted);
  display: block;
  margin-bottom: .35rem;
}
.wtp-slot-status {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  border-radius: 20px;
  padding: .18rem .6rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.wtp-status-booked { background: var(--wtp-gold); color: #fff; }
.wtp-status-open   { background: var(--wtp-green); color: #fff; }

.wtp-attendee-name {
  font-family: var(--wtp-font-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--wtp-text);
  margin-bottom: .2rem;
}
.wtp-attendee-info {
  font-size: .9rem;
  color: var(--wtp-muted);
  margin-bottom: .25rem;
  line-height: 1.5;
}
.wtp-attendee-info a {
  color: var(--wtp-blue);
  text-decoration: none;
}
.wtp-attendee-info a:hover { text-decoration: underline; }

.wtp-attendee-topic {
  font-size: .92rem;
  color: var(--wtp-blue-dark);
  font-style: italic;
  line-height: 1.4;
}

.wtp-no-slots-dash {
  color: var(--wtp-muted);
  font-style: italic;
  font-size: 1rem;
  padding: 1.2rem 0;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 620px) {
  .wtp-faculty-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 1rem;
  }
  .wtp-modal { padding: 1.4rem 1.2rem; }
  .wtp-modal-slot { flex-direction: column; gap: .5rem; }
  .wtp-slot-time-col { min-width: unset; }
  .wtp-step-title, .wtp-dash-title { font-size: 1.5rem; }
}
