/**
 * Serenity Booking - Frontend Styles
 * ThemeForest Compliant - No inline styles
 * 
 * @package Serenity_Booking
 * @version 1.0.0
 */

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   CSS VARIABLES (Set dynamically via PHP)
   ============================================ */
:root {
    /* Global Typography */
    --heading-main: #000000;
    --heading-sub: #6B7280;
    
    /* Step 1 - Location */
    --step1-card-bg: #FFFFFF;
    --step1-location-name: #3B82F6;
    --step1-text: #6B7280;
    --step1-open-bg: #27AE60;
    --step1-open-text: #FFFFFF;
    --step1-closed-bg: #E74C3C;
    --step1-closed-text: #FFFFFF;
    --step1-map-bg: #3B82F6;
    --step1-map-text: #FFFFFF;
    
    /* Step 2 - Services */
    --step2-card-bg: #FFFFFF;
    --step2-service-title: #3B82F6;
    --step2-description: #6B7280;
    --step2-price: #000000;
    --step2-selected-border: #3B82F6;
    
    /* Step 3 - Calendar & Time */
    --step3-month-year: #3B82F6;
    --step3-date-hover-bg: #E8F4FD;
    --step3-date-hover-text: #3B82F6;
    --step3-date-selected-bg: #3B82F6;
    --step3-date-selected-text: #FFFFFF;
    --step3-time-hover-bg: #E8F4FD;
    --step3-time-hover-text: #3B82F6;
    --step3-time-selected-bg: #3B82F6;
    --step3-time-selected-text: #FFFFFF;
    --step3-period-text: #F59E0B;
    
    /* Buttons */
    --btn-continue-bg: #3B82F6;
    --btn-continue-text: #FFFFFF;
    --btn-continue-hover-bg: #2563EB;
    --btn-continue-hover-text: #FFFFFF;
    --btn-back-bg: #E5E7EB;
    --btn-back-text: #374151;
    --btn-back-hover-bg: #D1D5DB;
    --btn-back-hover-text: #1F2937;
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */
.step-indicator {
    position: relative;
}

.step-line {
    position: absolute;
    top: 20px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.step-line.active {
    background: #4A90E2;
}

/* ============================================
   TYPOGRAPHY WITH DYNAMIC COLORS
   !important is required throughout this section to ensure dynamic
   color variables set by PHP (via wp_add_inline_style) override any
   color rules applied by the active WordPress theme.
   ============================================ */
h1, h2, .text-4xl, .text-3xl {
    color: var(--heading-main) !important;
}

h3, p.text-gray-600 {
    color: var(--heading-sub) !important;
}

/* ============================================
   BUTTONS
   ============================================ */

/* Continue Buttons */
#continue-to-services,
#continue-to-datetime,
#continue-to-details,
#complete-booking-btn {
    background-color: var(--btn-continue-bg) !important;
    color: var(--btn-continue-text) !important;
}

#continue-to-services:hover,
#continue-to-datetime:hover,
#continue-to-details:hover,
#complete-booking-btn:hover {
    background-color: var(--btn-continue-hover-bg) !important;
    color: var(--btn-continue-hover-text) !important;
}

/* Back Buttons */
#back-to-locations,
#back-to-services,
#back-to-datetime {
    background-color: var(--btn-back-bg) !important;
    color: var(--btn-back-text) !important;
}

#back-to-locations:hover,
#back-to-services:hover,
#back-to-datetime:hover {
    background-color: var(--btn-back-hover-bg) !important;
    color: var(--btn-back-hover-text) !important;
}

/* ============================================
   STEP 1 - LOCATION CARDS
   ============================================ */
#locations-grid .bg-white,
#step-1 .bg-white {
    background-color: var(--step1-card-bg) !important;
}

#locations-grid h3,
#locations-grid .text-xl,
#step-1 .location-card h3,
#step-1 .text-xl.font-bold {
    color: var(--step1-location-name) !important;
}

#locations-grid .text-gray-600,
#step-1 .location-card .text-gray-600,
#step-1 .text-sm.text-gray-600 {
    color: var(--step1-text) !important;
}

#locations-grid .bg-green-500,
#step-1 .bg-green-500 {
    background-color: var(--step1-open-bg) !important;
    color: var(--step1-open-text) !important;
}

#locations-grid .bg-red-500,
#step-1 .bg-red-500 {
    background-color: var(--step1-closed-bg) !important;
    color: var(--step1-closed-text) !important;
}

#locations-grid .bg-blue-600,
#step-1 .bg-blue-600:not(#continue-to-services) {
    background-color: var(--step1-map-bg) !important;
    color: var(--step1-map-text) !important;
}

/* ============================================
   STEP 2 - SERVICE CARDS
   ============================================ */
#step-2 .bg-white {
    background-color: var(--step2-card-bg) !important;
}

#step-2 .text-xl {
    color: var(--step2-service-title) !important;
}

#step-2 .text-gray-600 {
    color: var(--step2-description) !important;
}

#step-2 .text-2xl.font-bold {
    color: var(--step2-price) !important;
}

#step-2 .border-blue-600 {
    border-color: var(--step2-selected-border) !important;
}

/* ============================================
   STEP 3 - CALENDAR & TIME SLOTS
   ============================================ */
#calendar-month-year {
    color: var(--step3-month-year) !important;
}

#step-3 h3 {
    color: var(--step3-period-text) !important;
}

.time-slot-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   SERVICE ICONS
   ============================================ */
.service-icon-container {
    text-align: center;
}

.service-icon-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto;
}

/* Desktop: left align icons */
@media (min-width: 768px) {
    .service-icon-container {
        text-align: left;
    }
    
    .service-icon-img {
        margin: 0;
    }
}

/* ── Location cards grid ──────────────────────────────────── */
#locations-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (min-width: 640px) {
    #locations-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    #locations-grid { grid-template-columns: repeat(3, 1fr); }
}

.serenity-location-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.1) !important;
    transform: translateY(-2px);
}

/* ── Location card image & text polish ──────────────────────── */
.serenity-location-card {
    display: flex;
    flex-direction: column;
}

/* Image thumbnail — fixed height, never grows */
.serenity-location-card .slc-img-wrap {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: #eff6ff;
    flex-shrink: 0;
}

.serenity-location-card .slc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Map button — sits bottom-right, clean pill style */
.serenity-location-card .slc-map-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--step1-map-bg, #2563eb);
    color: var(--step1-map-text, #fff);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    letter-spacing: 0.3px;
    z-index: 10;
}

.serenity-location-card .slc-map-btn:hover {
    background: var(--step1-map-bg, #1d4ed8);
    filter: brightness(0.9);
    color: var(--step1-map-text, #fff);
    text-decoration: none;
}

/* Card body — consistent padding & spacing */
.serenity-location-card .slc-body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.serenity-location-card .slc-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
    color: var(--step1-location-name, #3B82F6) !important;
}

.serenity-location-card .slc-address,
.serenity-location-card .slc-phone {
    font-size: 0.82rem;
    color: var(--step1-text, #6b7280) !important;
    margin: 0;
    line-height: 1.4;
}

.serenity-location-card .slc-badge-wrap {
    margin-top: 12px;
}

.serenity-location-card .slc-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

/* ── Step 4 summary image — constrained height ───────────────── */
#summary-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* ── Step 5 confirm image — constrained height ───────────────── */
#confirm-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════
   SERENITY BOOKING — AESTHETIC TYPOGRAPHY & LAYOUT SYSTEM
   Design principles: hierarchy, whitespace, rhythm, trust
   ═══════════════════════════════════════════════════════════ */

/* ── Google Montserrat font - premium, modern, sophisticated ── */
.serenity-booking-page * {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Step headings ─────────────────────────────────────────── */
.serenity-step-heading {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 10px 0;
}
.serenity-step-sub {
    font-size: 1rem;
    color: #64748b;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.01em;
    margin: 0;
}

/* ── Progress bar labels ───────────────────────────────────── */
.step-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-top: 6px;
}

/* ── Location card typography ─────────────────────────────── */
.serenity-location-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.serenity-location-card p {
    font-size: 0.83rem;
    color: #64748b;
    line-height: 1.55;
}

/* ── Section labels (caps style) ──────────────────────────── */
.serenity-label-caps {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 6px;
    display: block;
}

/* ── Summary card ─────────────────────────────────────────── */
.serenity-summary-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.serenity-detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 2px;
}
.serenity-detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}
.serenity-detail-sub {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 1px;
    line-height: 1.4;
}

/* ── Form labels ──────────────────────────────────────────── */
#booking-form label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 6px;
    display: block;
}
#booking-form input,
#booking-form select,
#booking-form textarea {
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 500;
}
#booking-form input::placeholder,
#booking-form textarea::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

/* ── Service cards ────────────────────────────────────────── */
#services-grid h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
    line-height: 1.3;
}
#services-grid .service-price {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #2563eb;
}
#services-grid .service-duration {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
#services-grid .service-desc {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
}
#services-grid .category-header {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #94a3b8;
}

/* ── Calendar ─────────────────────────────────────────────── */
#calendar-month-year {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}
#calendar-grid .cal-day {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── Time slots ───────────────────────────────────────────── */
.time-slot-btn {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.time-period-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    margin: 16px 0 8px;
}

/* ── Confirmation step ────────────────────────────────────── */
#confirmation-number {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}
.serenity-confirm-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 12px;
}

/* ── Continue / Back buttons ──────────────────────────────── */
#continue-to-services,
#continue-to-datetime,
#continue-to-details,
#complete-booking-btn {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
#back-to-locations,
#back-to-services,
#back-to-datetime {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Confirmation number badge ────────────────────────────── */
.serenity-conf-badge {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.serenity-conf-badge-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #3b82f6;
    margin-bottom: 4px;
    display: block;
}
.serenity-conf-badge-number {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1e3a8a;
}

/* ── Total price ──────────────────────────────────────────── */
.serenity-total-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.serenity-total-value {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #2563eb;
}

/* ── Booking summary service name ─────────────────────────── */
#summary-service-name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.2;
}

/* ── Search bar placeholder ───────────────────────────────── */
#service-search::placeholder { font-size: 0.9rem; }

/* ── Success heading ──────────────────────────────────────── */
#step-5 h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}
#step-5 > div > div > p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

/* ── "What's next" info box ───────────────────────────────── */
.serenity-info-box-text h5 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.serenity-info-box-text p {
    font-size: 0.82rem;
    line-height: 1.6;
    color: #1e40af;
}

/* ── Branding footer ──────────────────────────────────────── */
.serenity-footer-powered {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #94a3b8;
}
.serenity-footer-brand {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.serenity-footer-tagline {
    font-size: 0.72rem;
    color: #cbd5e1;
    letter-spacing: 0.04em;
    margin-top: 3px;
}

.serenity-empty-state{color:#6b7280;text-align:center;padding:2rem}
.serenity-map-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
