/* =====================================
   BOOKING CSS - PETER ESTELA
   Sistema de Reservas y Consultas
   ===================================== */

/* Booking Modal */
.booking-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem 0;
}

.booking-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.booking-content {
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    margin: auto;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.booking-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.booking-close:hover {
    background: #f3f4f6;
    color: var(--primary-gray);
}

/* Booking Header */
.booking-header {
    margin-bottom: 2rem;
    text-align: center;
}

.booking-header h3 {
    color: var(--primary-gray);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.booking-header p {
    color: #6b7280;
    font-size: 1rem;
}

/* Consultation Types */
.consultation-types {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.consultation-option {
    border: 2px solid #e5e7eb;
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.consultation-option:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
    transform: translateY(-2px);
}

.consultation-option.selected {
    border-color: var(--primary-blue);
    background: var(--light-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.consultation-option h5 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.consultation-option p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

.consultation-price {
    background: var(--primary-blue);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Calendar Section */
#calendar-section {
    margin-bottom: 2rem;
}

#calendar-section h4 {
    color: var(--primary-gray);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

#date-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.date-option {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.date-option:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
}

.date-option.selected {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
}

.date-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}

.date-option.disabled:hover {
    border-color: #e5e7eb;
    background: #f9fafb;
}

/* Time Section */
#time-section {
    margin-bottom: 2rem;
}

#time-section h4 {
    color: var(--primary-gray);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

#time-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.time-option {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.time-option:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
}

.time-option.selected {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
}

.time-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}

.time-option.disabled:hover {
    border-color: #e5e7eb;
    background: #f9fafb;
}

/* Booking Summary */
#booking-summary {
    background: var(--light-blue);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

#booking-summary h4 {
    color: var(--primary-gray);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-blue);
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid rgba(37, 99, 235, 0.3);
}

.summary-label {
    color: #6b7280;
    font-weight: 500;
}

.summary-value {
    color: var(--primary-gray);
    font-weight: 600;
}

/* Booking Form */
.booking-form {
    display: grid;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    gap: 1rem;
}

.form-row.two-cols {
    grid-template-columns: 1fr 1fr;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-gray);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Payment Info */
.payment-info {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.payment-info p {
    margin: 0;
    color: #92400e;
    font-size: 0.9rem;
}

.payment-info strong {
    color: #78350f;
}

/* Booking Actions */
.booking-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.booking-actions .btn {
    min-width: 120px;
}

/* Success Message */
.booking-success {
    text-align: center;
    padding: 2rem;
}

.booking-success-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.booking-success-icon i {
    font-size: 2.5rem;
    color: white;
}

.booking-success h3 {
    color: var(--primary-gray);
    margin-bottom: 1rem;
}

.booking-success p {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Loading State */
.booking-loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.booking-loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-content {
        padding: 1.5rem;
        width: 95%;
    }

    .booking-header h3 {
        font-size: 1.5rem;
    }

    .form-row.two-cols {
        grid-template-columns: 1fr;
    }

    #date-selector {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    #time-selector {
        grid-template-columns: repeat(3, 1fr);
    }

    .booking-actions {
        flex-direction: column;
    }

    .booking-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .booking-modal {
        padding: 0;
    }

    .booking-content {
        border-radius: 0;
        min-height: 100vh;
    }

    .consultation-option {
        padding: 1rem;
    }

    .consultation-option h5 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}