/* Overlay */
#ghl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 30, 50, 0.75);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* Caja principal - MUCHO más grande */
#ghl-modal-box {
    background: #ffffff;
    width: 95%;
    max-width: 950px;
    padding: 50px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    font-family: inherit;
    box-sizing: border-box;
    padding-top: 60px;
    max-height: 95vh;
    overflow-y: auto;
}

#ghl-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    z-index: 10;
}

#ghl-close-btn:hover {
    color: #113255;
}

/* Sticky Badge */
#ghl-selected-service-badge {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: #113255;
    color: #fff;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

#ghl-modal-box h3 {
    margin-top: 0;
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
    color: #113255;
    font-size: 26px;
}

/* --- PASO MODALIDAD: IN-PERSON vs VIRTUAL --- */
.ghl-modality-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 10px 0 10px;
}

.ghl-modality-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 40px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.ghl-modality-card:hover {
    border-color: #113255;
    transform: translateY(-4px);
    box-shadow: 0 14px 24px rgba(17, 50, 85, 0.10);
    background: #f0f5fa;
}

.ghl-modality-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f0f5fa;
    color: #113255;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.ghl-modality-icon svg {
    width: 32px;
    height: 32px;
}

.ghl-modality-card h4 {
    margin: 0 0 8px;
    color: #113255;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.ghl-modality-card p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    max-width: 240px;
}

@media (max-width: 600px) {
    .ghl-modality-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .ghl-modality-card {
        min-height: 180px;
        padding: 30px 20px;
    }
}

/* --- PASO 0: CARDS DE SERVICIOS (3 COLUMNAS) --- */
.ghl-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.ghl-service-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 110px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.ghl-service-card:hover {
    border-color: #94a3b8;
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.ghl-service-card.active {
    border-color: #113255;
    background: #f0f5fa;
    box-shadow: 0 0 0 1px #113255;
}

.ghl-service-card h4 {
    margin: 0;
    color: #113255;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

/* --- PASO 1: SIDE BY SIDE --- */
.ghl-calendar-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 15px;
}

.ghl-calendar-left {
    flex: 1;
    max-width: 380px;
}

.ghl-slots-right {
    flex: 1;
    max-height: 380px;
    overflow-y: auto;
    padding-left: 30px;
    border-left: 1px solid #e5e7eb;
    width: 100%;
}

/* --- PASO 2: FORMULARIO --- */
.ghl-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ghl-form-col {
    flex: 1;
}

#ghl-booking-form input[type="text"],
#ghl-booking-form input[type="email"],
#ghl-booking-form input[type="tel"],
#ghl-booking-form select,
#ghl-booking-form textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: #fff;
}

#ghl-booking-form textarea {
    resize: vertical;
    min-height: 100px;
}

#ghl-booking-form input:focus,
#ghl-booking-form select:focus,
#ghl-booking-form textarea:focus {
    border-color: #113255;
    outline: none;
}

.ghl-form-full {
    margin-bottom: 20px;
}

/* Checkbox de consentimiento calcado al screenshot */
.ghl-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
    padding: 0;
}

.ghl-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.ghl-checkbox-group label {
    font-size: 16px;
    color: #113255;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    margin: 0;
}

/* Botones principales */
#ghl-btn-next-to-date,
#ghl-submit-btn {
    width: 100%;
    padding: 18px;
    background: #113255;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#ghl-btn-next-to-date:hover,
#ghl-submit-btn:hover {
    background: #1a4a7d;
}

#ghl-btn-next-to-date:disabled,
#ghl-submit-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* Fix de Elementor para el botón atrás */
.ghl-back-btn,
.ghl-back-btn:focus,
.ghl-back-btn:active {
    background: transparent !important;
    border: none !important;
    color: #113255 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    display: inline-block;
}

.ghl-back-btn:hover {
    color: #0073e6 !important;
    text-decoration: underline !important;
}

/* Flatpickr adaptado */
#ghl-date-input {
    display: none;
}

.flatpickr-calendar.inline {
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
}

.flatpickr-day.selected {
    background: #113255 !important;
    border-color: #113255 !important;
}

/* Grid de Horarios */
#ghl-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    width: 100%;
    padding-right: 5px;
}

.ghl-slot-btn {
    padding: 14px 10px;
    border: 1px solid #113255;
    background: #fff;
    color: #113255;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.ghl-slot-btn:hover {
    background: #113255;
    color: #fff;
}

.ghl-loading {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    font-size: 16px;
    grid-column: 1 / -1;
    margin-top: 50px;
}

.ghl-empty-msg {
    text-align: center;
    color: #666;
    font-size: 16px;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 50px;
}

#ghl-selected-time-display {
    text-align: center;
    font-size: 16px;
    color: #113255;
    background: #f0f5fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #113255;
}

/* --- PASO 3: CONFIRMACIÓN --- */
.ghl-success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.ghl-success-icon {
    width: 80px;
    height: 80px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    animation: ghl-scale-in 0.4s ease-out;
}

.ghl-success-icon svg {
    width: 40px;
    height: 40px;
    color: #059669;
}

#ghl-step-3 h3 {
    margin-bottom: 16px;
}

.ghl-success-message {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto;
}

.ghl-success-divider {
    width: 60px;
    height: 2px;
    background: #e5e7eb;
    margin: 28px auto;
}

.ghl-success-note {
    font-size: 14px;
    color: #9ca3af;
    margin: 0 auto 35px;
}

#ghl-done-btn {
    padding: 16px 60px;
    background: #113255;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#ghl-done-btn:hover {
    background: #1a4a7d;
}

@keyframes ghl-scale-in {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .ghl-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ghl-calendar-layout {
        flex-direction: column;
        gap: 20px;
    }

    .ghl-calendar-left {
        max-width: 100%;
        margin-bottom: 10px;
    }

    .ghl-slots-right {
        border-left: none;
        padding-left: 0;
        max-height: 250px;
    }

    .ghl-form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .ghl-services-grid {
        grid-template-columns: 1fr;
    }
}

/* --- BOOKING SUMMARY (página /booking-confirmed/) --- */
.ghl-summary-card {
    background: #ffffff;
    width: 95%;
    max-width: 640px;
    margin: 60px auto;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
    text-align: center;
    box-sizing: border-box;
    font-family: inherit;
}

.ghl-summary-card .ghl-success-icon {
    margin: 0 auto 25px;
}

.ghl-summary-card h3 {
    margin: 0 0 16px;
    color: #113255;
    font-size: 26px;
    font-weight: 600;
    text-align: center;
}

.ghl-summary-greeting {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto 30px;
}

.ghl-summary-details {
    background: #f0f5fa;
    border-left: 4px solid #113255;
    border-radius: 8px;
    padding: 20px 25px;
    margin: 0 auto 10px;
    max-width: 480px;
    text-align: left;
}

.ghl-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(17, 50, 85, 0.1);
}

.ghl-summary-row:last-child {
    border-bottom: none;
}

.ghl-summary-label {
    font-size: 14px;
    font-weight: 600;
    color: #113255;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.ghl-summary-value {
    font-size: 16px;
    color: #113255;
    font-weight: 500;
    text-align: right;
}

.ghl-summary-card .ghl-success-divider {
    margin: 28px auto;
}

.ghl-summary-card .ghl-success-note {
    font-size: 14px;
    color: #9ca3af;
    margin: 0 auto 30px;
    max-width: 480px;
    line-height: 1.6;
}

.ghl-summary-home-btn {
    display: inline-block;
    padding: 16px 60px;
    background: #113255;
    color: #fff !important;
    border: none;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none !important;
}

.ghl-summary-home-btn:hover {
    background: #1a4a7d;
    color: #fff !important;
}

@media (max-width: 480px) {
    .ghl-summary-card {
        padding: 35px 20px;
        margin: 30px auto;
    }

    .ghl-summary-row {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .ghl-summary-value {
        text-align: left;
    }
}