/**
 * Booking Modal Styles
 * Модальное окно выбора способа записи
 */

/* Overlay */
.booking-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.booking-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.booking-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.booking-modal-overlay.active .booking-modal {
    transform: scale(1);
}

/* Close Button */
.booking-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    z-index: 1;
}

.booking-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Modal Header */
.booking-modal-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.booking-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.booking-modal-header .selected-date {
    color: #E31937;
    font-weight: 600;
}

/* Booking Options Section */
.booking-options {
    padding: 20px 24px;
}

.booking-options-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    text-align: center;
}

/* Booking Buttons */
.booking-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.booking-btn:last-child {
    margin-bottom: 0;
}

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

.booking-btn:active {
    transform: translateY(0);
}

/* MAX Button */
.booking-btn--max {
    background: linear-gradient(135deg, #6C5CE7 0%, #a855f7 100%);
    color: #fff;
}

.booking-btn--max:hover {
    background: linear-gradient(135deg, #5B4BD5 0%, #9333ea 100%);
}

/* Telegram Button */
.booking-btn--telegram {
    background: linear-gradient(135deg, #0088cc 0%, #00a8e8 100%);
    color: #fff;
}

.booking-btn--telegram:hover {
    background: linear-gradient(135deg, #0077b3 0%, #0095c8 100%);
}

/* Direct Booking Button */
.booking-btn--direct {
    background: #fff;
    border: 2px solid #22c55e;
    color: #22c55e;
}

.booking-btn--direct:hover {
    background: #22c55e;
    color: #fff;
}

/* Phones Section */
.phones-section {
    padding: 16px 24px 24px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 0 0 16px 16px;
}

.phones-section p {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
}

.phones-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phone-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
}

.phone-link:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.phone-link i,
.phone-link svg {
    margin-right: 8px;
    color: #E31937;
}

/* Direct Booking Form */
.direct-form {
    padding: 20px 24px;
    display: none;
}

.direct-form.active {
    display: block;
}

.direct-form-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.direct-form-back {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #666;
    padding: 0;
    margin-right: 12px;
}

.direct-form-back:hover {
    color: #333;
}

.direct-form h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.direct-form .form-group {
    margin-bottom: 14px;
}

.direct-form input,
.direct-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.direct-form input:focus,
.direct-form textarea:focus {
    outline: none;
    border-color: #E31937;
    box-shadow: 0 0 0 3px rgba(227, 25, 55, 0.1);
}

.direct-form textarea {
    resize: vertical;
    min-height: 80px;
}

.direct-form .selected-date-display {
    background: #f5f5f5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 14px;
}

.direct-form .selected-date-display strong {
    color: #E31937;
}

.direct-form-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.direct-form-submit:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-1px);
}

.direct-form-submit:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: none;
}

/* Checkbox Styles */
.form-checkbox {
    margin-bottom: 16px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    margin: 3px 10px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-text a {
    color: #E31937;
    text-decoration: none;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* Success Message */
.direct-form-success {
    text-align: center;
    padding: 40px 24px;
    display: none;
}

.direct-form-success.active {
    display: block;
}

.direct-form-success .success-icon {
    font-size: 48px;
    color: #22c55e;
    margin-bottom: 16px;
}

.direct-form-success h4 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #333;
}

.direct-form-success p {
    color: #666;
    margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .booking-modal {
        max-width: 100%;
        width: 95%;
        border-radius: 12px;
        margin: 10px;
    }

    .booking-modal-header {
        padding: 20px 16px 12px;
    }

    .booking-modal-header h3 {
        font-size: 18px;
    }

    .booking-options {
        padding: 16px;
    }

    .booking-btn {
        padding: 12px 16px;
        font-size: 15px;
    }

    .phones-section {
        padding: 12px 16px 16px;
    }

    .direct-form {
        padding: 16px;
    }
}

/* Animation for modal opening */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
    }
    to {
        transform: scale(1) translateY(0);
    }
}

.booking-modal-overlay.active {
    animation: modalFadeIn 0.3s ease;
}

.booking-modal-overlay.active .booking-modal {
    animation: modalSlideIn 0.3s ease;
}
