/* ==========================================================================
   HEART MATES CLINIC - COMPLETE FLUID APPOINTMENT LAYOUT MATRIX
   File: public/css/appointment_frontend_hms.css
   ========================================================================== */

/* --- Section 1: Hero Banner Layout Elements --- */
.services-hero-section {
    background-color: #FAFAFA;
    padding: 70px 0 50px 0;
    width: 100%;
    border-bottom: 1px solid #EFECE6;
}

.services-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
}

.services-main-title {
    color: #111111;
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.services-divider-gold {
    width: 60px;
    height: 3px;
    background-color: #D2AE6D; 
    margin: 0 auto 20px auto;
    border-radius: 1.5px;
}

.services-hero-subtitle {
    color: #555555;
    font-size: 1.1rem;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Section 2: Form Structural Scaffolding Wrapper --- */
.booking-layout-wrapper {
    width: 100%;
    min-height: 100vh;
    background-color: #F8FAFC;
    padding: 40px 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-container {
    max-width: 1200px; 
    width: 100%;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    padding: 40px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
    margin: 0 auto;
}

.booking-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1E3A60;
    text-transform: uppercase;
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 10px;
    margin: 35px 0 20px 0;
    letter-spacing: 0.5px;
}

.booking-section-title:first-of-type {
    margin-top: 0;
}

.booking-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 20px;
}

.booking-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.booking-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: #334155;
}

.booking-input, 
.booking-select, 
.booking-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1E293B;
    background-color: #FFFFFF;
    box-sizing: border-box;
    font-family: inherit;
    transition: all 0.2s ease-in-out;
}

.booking-select { height: 48px; }
.booking-textarea { resize: none; }

.booking-input:focus, 
.booking-select:focus, 
.booking-textarea:focus {
    border-color: #1E3A60;
    box-shadow: 0 0 0 3px rgba(30, 58, 96, 0.1);
    outline: none;
}

/* --- Section 3: Identity Autocomplete Suggestions --- */
.hms-lookup-card {
    background: #FAFAFA;
    border: 2px solid #1E3A60;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.hms-autocomplete-box {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 12px;
}

.hms-profile-pill {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    padding: 14px 18px;
    border-radius: 8px;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hms-profile-pill:hover {
    border-color: #1E3A60;
    background-color: #F1F5F9;
}

.hms-pill-title { font-weight: 700; color: #1E3A60; font-size: 0.9rem; }
.hms-pill-meta { font-size: 0.78rem; color: #64748B; margin-top: 2px; }

/* --- Section 4: Aligned 15-Minute Grid Layout Matrix Generator --- */
#slots_container,
.slots-grid-wrapper, 
.slots-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 12px !important;
    margin-top: 15px !important;
    width: 100% !important;
}

.hms-slot-box {
    padding: 14px !important;
    text-align: center !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    user-select: none !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* HIGH-VISIBILITY STATE DESIGN SPECIFICATIONS */
.hms-slot-available {
    background-color: #E8F5E9 !important; /* AVAILABLE: Vibrant Emerald Green */
    color: #2E7D32 !important;
    border-color: #C8E6C9 !important;
    cursor: pointer !important;
}

.hms-slot-available:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15) !important;
    background-color: #C8E6C9 !important;
}

.hms-slot-selected {
    background-color: #1E3A60 !important; /* SELECTED: Active Corporate Deep Blue */
    color: #FFFFFF !important;
    border-color: #1E3A60 !important;
    box-shadow: 0 4px 12px rgba(30, 58, 96, 0.25) !important;
}

.hms-slot-booked {
    background-color: #EDF2F7 !important; /* BOOKED / OCCUPIED: Muted Soft Slate Gray */
    color: #A0AEC0 !important;
    border-color: #E2E8F0 !important;
    cursor: not-allowed !important;
    text-decoration: line-through !important;
    opacity: 0.7 !important;
}

.grid-col-full {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}

/* --- Section 5: Captcha & Layout Elements --- */
.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #F8FAFC;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    width: 100%;
    box-sizing: border-box;
}

.captcha-question {
    font-weight: 700;
    color: #1E3A60;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.booking-submit-btn {
    width: 100%;
    background: #1E3A60;
    color: #FFFFFF;
    border: none;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.flatpickr-day.is-clinic-open-day { background-color: #E8F5E9 !important; color: #2E7D32 !important; font-weight: 700 !important; }
.flatpickr-day.is-clinic-closed-day { background-color: #FFEBEE !important; color: #C62828 !important; text-decoration: line-through !important; cursor: not-allowed !important; }

@media (max-width: 768px) {
    .booking-grid-2 { grid-template-columns: 1fr; gap: 16px; }
    .booking-container { padding: 25px 15px; }
    .slots-grid-wrapper, .slots-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)) !important; }
}