/* ===================================================================
   AlleDoctor Booking — Calendar CSS
   Colors: alledoctor.pl exact system palette
   Primary: #5A5E5D | Accent: #F2F47C | Font: Rethink Sans
   =================================================================== */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --adb-primary:        #5A5E5D;
  --adb-primary-light:  #747877;
  --adb-primary-ultra:  #f0f1f1;
  --adb-accent:         #F2F47C;
  --adb-accent-dark:    #d4d640;
  --adb-alt-accent:     #A5AEAB;
  --adb-success:        #10b981;
  --adb-warning:        #f59e0b;
  --adb-danger:         #ef4444;
  --adb-text:           #222222;
  --adb-text-muted:     #666B6A;
  --adb-border:         #DFE4E2;
  --adb-bg:             #F6F7F7;
  --adb-white:          #FFFFFF;
  --adb-radius:         16px;
  --adb-radius-sm:      10px;
  --adb-shadow:         0 4px 24px rgba(90, 94, 93, 0.10);
  --adb-shadow-hover:   0 8px 32px rgba(90, 94, 93, 0.18);
  --adb-font:           'Rethink Sans', 'Segoe UI', Arial, sans-serif;
  --adb-transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── WRAP ─────────────────────────────────────────────────────────── */
.adb-checkout-wrap {
  font-family: var(--adb-font);
  margin-bottom: 32px;
}

/* ── SERVICE CARD ─────────────────────────────────────────────────── */
.adb-service-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--adb-primary) 0%, var(--adb-primary-light) 100%);
  color: #fff;
  padding: 20px 24px;
  border-radius: var(--adb-radius);
  margin-bottom: 16px;
  box-shadow: var(--adb-shadow);
}
.adb-service-card__icon { font-size: 32px; flex-shrink: 0; }
.adb-service-card__info { flex: 1; }
.adb-service-card__label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.75;
  margin-bottom: 4px;
}
.adb-service-card__name {
  display: block;
  font-size: 18px;
  font-weight: 700;
}
.adb-service-card__price {
  font-size: 20px;
  font-weight: 800;
}
.adb-service-card__price .woocommerce-Price-amount { color: #fff; }

/* ── DOCTOR CARD ──────────────────────────────────────────────────── */
.adb-doctor-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--adb-white);
  border: 1px solid var(--adb-border);
  padding: 16px 20px;
  border-radius: var(--adb-radius);
  margin-bottom: 16px;
  box-shadow: var(--adb-shadow);
}
.adb-doctor-card__photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--adb-primary);
  flex-shrink: 0;
}
.adb-doctor-card__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--adb-primary-ultra);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
  border: 3px solid var(--adb-primary);
}
.adb-doctor-card__info { flex: 1; }
.adb-doctor-card__info strong { display: block; font-size: 15px; color: var(--adb-text); }
.adb-doctor-card__info span   { font-size: 13px; color: var(--adb-text-muted); }
.adb-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 99px;
  font-size: 12px; font-weight: 600;
}
.adb-badge--green { background: #d1fae5; color: #065f46; }
.adb-badge--green::before { content: '●'; font-size: 8px; }

/* ── SECTION HEADER ───────────────────────────────────────────────── */
.adb-calendar-section {
  background: var(--adb-white);
  border: 1px solid var(--adb-border);
  border-radius: var(--adb-radius);
  padding: 24px;
  box-shadow: var(--adb-shadow);
  margin-bottom: 16px;
}
.adb-section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}
.adb-section-header__icon { font-size: 24px; margin-top: 2px; }
.adb-section-header__title {
  font-size: 18px; font-weight: 700;
  color: var(--adb-text); margin: 0 0 4px;
}
.adb-section-header__subtitle {
  font-size: 13px; color: var(--adb-text-muted); margin: 0;
}

/* ── CALENDAR ─────────────────────────────────────────────────────── */
.adb-calendar {
  background: var(--adb-bg);
  border-radius: var(--adb-radius-sm);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--adb-border);
}

/* Header nav */
.adb-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.adb-calendar__month-label {
  font-size: 17px;
  font-weight: 700;
  color: var(--adb-text);
  text-transform: capitalize;
}
.adb-calendar__nav {
  background: var(--adb-white);
  border: 1px solid var(--adb-border);
  border-radius: 10px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--adb-transition);
  color: var(--adb-primary);
}
.adb-calendar__nav:hover {
  background: var(--adb-primary);
  color: #fff;
  border-color: var(--adb-primary);
  transform: scale(1.05);
}
.adb-calendar__nav svg { width: 16px; height: 16px; }

/* Weekday labels */
.adb-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}
.adb-calendar__weekdays span {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--adb-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 0;
}

/* Days grid */
.adb-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.adb-day {
  position: relative;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--adb-transition);
  color: var(--adb-text);
  background: var(--adb-white);
  border: 1.5px solid transparent;
  user-select: none;
  min-width: 36px;
  min-height: 36px;
}
.adb-day:hover:not(.adb-day--disabled):not(.adb-day--empty) {
  background: var(--adb-primary-ultra);
  border-color: var(--adb-primary);
  color: var(--adb-primary);
  transform: scale(1.05);
}
.adb-day--today {
  border-color: var(--adb-primary);
  font-weight: 700;
}
.adb-day--today::after {
  content: '';
  position: absolute;
  bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--adb-primary);
}
.adb-day--selected {
  background: var(--adb-primary) !important;
  color: #fff !important;
  border-color: var(--adb-primary) !important;
  box-shadow: 0 4px 12px rgba(90, 94, 93, 0.35);
  transform: scale(1.08);
  font-weight: 700;
}
.adb-day--disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
}
.adb-day--empty {
  background: transparent;
  cursor: default;
  pointer-events: none;
}
.adb-day--loading { opacity: 0.6; pointer-events: none; }

/* Month slide animations */
@keyframes adb-slide-left {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes adb-slide-right {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.adb-calendar__grid--slide-left  { animation: adb-slide-left  0.25s var(--adb-transition) both; }
.adb-calendar__grid--slide-right { animation: adb-slide-right 0.25s var(--adb-transition) both; }

/* ── SELECTED DATE ────────────────────────────────────────────────── */
.adb-selected-date {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--adb-primary-ultra);
  border: 1px solid var(--adb-primary);
  border-radius: var(--adb-radius-sm);
  margin-bottom: 16px;
  animation: adb-fadein 0.3s ease;
}
.adb-selected-date__text {
  font-size: 14px;
  font-weight: 600;
  color: var(--adb-primary);
}

/* ── TIME SLOTS ───────────────────────────────────────────────────── */
.adb-timeslots-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.adb-timeslots-header h4 {
  font-size: 15px; font-weight: 700;
  color: var(--adb-text); margin: 0;
}
.adb-timeslots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.adb-timeslots__hint {
  font-size: 13px;
  color: var(--adb-text-muted);
  font-style: italic;
  margin: 0;
  padding: 16px 0;
  width: 100%;
}
.adb-timeslot {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--adb-border);
  background: var(--adb-white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--adb-transition);
  color: var(--adb-text);
  animation: adb-fadein 0.25s ease;
}
.adb-timeslot:hover:not(.adb-timeslot--taken) {
  border-color: var(--adb-primary);
  background: var(--adb-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(90,94,93,0.25);
}
.adb-timeslot--selected,
.adb-timeslot--selected:hover {
  background: var(--adb-accent) !important;
  border-color: var(--adb-accent) !important;
  color: var(--adb-text) !important;
  box-shadow: 0 4px 16px rgba(242, 244, 124, 0.4) !important;
  transform: translateY(-2px) !important;
}
.adb-timeslot--taken {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}
.adb-timeslots__loading {
  display: flex; align-items: center; gap: 8px;
  color: var(--adb-text-muted); font-size: 14px;
}
.adb-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--adb-border);
  border-top-color: var(--adb-primary);
  border-radius: 50%;
  animation: adb-spin 0.7s linear infinite;
}
@keyframes adb-spin { to { transform: rotate(360deg); } }

/* ── BOOKING SUMMARY ──────────────────────────────────────────────── */
.adb-booking-summary {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 1.5px solid #10b981;
  border-radius: var(--adb-radius-sm);
  padding: 16px 20px;
  margin-bottom: 8px;
  animation: adb-fadein 0.3s ease;
}
.adb-booking-summary__inner {
  display: flex; align-items: center; gap: 12px;
}
.adb-booking-summary__check {
  flex: 0 0 32px; width: 32px; height: 32px;
  min-width: 32px; max-width: 32px;
  background: var(--adb-success);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.adb-booking-summary__inner > div { flex: 1; }
.adb-booking-summary__inner strong {
  display: block; font-size: 13px; color: #065f46; margin-bottom: 2px;
}
.adb-booking-summary__inner span {
  font-size: 15px; font-weight: 700; color: #064e3b;
}
.adb-booking-summary__change {
  background: transparent; border: 1.5px solid #10b981;
  border-radius: 8px; padding: 6px 14px;
  font-size: 13px; color: #065f46; cursor: pointer;
  transition: var(--adb-transition);
}
.adb-booking-summary__change:hover {
  background: #10b981; color: #fff;
}

/* ── UTILITIES ────────────────────────────────────────────────────── */
.adb-hidden { display: none !important; }

@keyframes adb-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── THANK YOU PAGE ───────────────────────────────────────────────── */
.adb-thankyou-booking {
  background: linear-gradient(135deg, #f0f1f1 0%, #F2F47C 100%);
  border: 1.5px solid var(--adb-primary);
  border-radius: var(--adb-radius);
  padding: 28px 32px;
  margin: 24px 0;
  animation: adb-fadein 0.4s ease;
}
.adb-thankyou-booking__inner {
  display: flex; align-items: flex-start; gap: 20px;
}
.adb-thankyou-booking__icon {
  font-size: 40px; flex-shrink: 0;
}
.adb-thankyou-booking__inner h3 {
  font-size: 20px; font-weight: 700;
  color: var(--adb-primary); margin: 0 0 8px;
}
.adb-thankyou-booking__inner p {
  font-size: 16px; color: var(--adb-text); margin: 0 0 6px;
}
.adb-thankyou-booking__note {
  font-size: 13px !important;
  color: var(--adb-text-muted) !important;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .adb-calendar-section { padding: 16px; }
  .adb-service-card { flex-wrap: wrap; }
  .adb-day { font-size: 12px; min-width: 30px; min-height: 30px; }
  .adb-timeslot { padding: 8px 14px; font-size: 13px; }
}
