/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background-color: var(--white);
    border-radius: 40px;
    width: 90%;
    max-width: 500px;
    max-height: 110vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 30px 30px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-dark);
}

.modal-header h2 span {
    font-weight: 300;
    color: var(--text-dark);
}

.modal-close {
    width: 40px;
    height: 40px;
    background: #fae9e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 20px;
    color: var(--primary-dark);
}

.modal-close:hover {
    background: var(--primary);
    color: white;
}

.modal-body {
    padding: 30px;
}

/* Прогресс бар (для многошаговой формы) */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-light);
    z-index: 1;
}

.progress-step {
    width: 32px;
    height: 32px;
    background: var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
    background-color: white;
    border: 2px solid var(--border-light);
}

.progress-step.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.progress-step.completed {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4a5a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Радио кнопки (мастера) */
.masters-radio-group {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.master-radio {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.master-radio:hover {
    border-color: var(--primary);
    background: #fae9e9;
}

.master-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    accent-color: var(--primary);
}

.master-radio-info {
    flex: 1;
}

.master-radio-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.master-radio-spec {
    font-size: 12px;
    color: var(--text-muted);
}

/* Дата и время */
.date-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.date-btn {
    padding: 12px 5px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
}

.date-btn:hover {
    border-color: var(--primary);
    background: #fae9e9;
}

.date-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.date-btn .day {
    font-weight: 600;
    font-size: 16px;
}

.date-btn .month {
    font-size: 12px;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.time-btn {
    padding: 10px 5px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    transition: 0.2s;
}

.time-btn:hover:not(.disabled) {
    border-color: var(--primary);
    background: #fae9e9;
}

.time-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.time-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f0f0f0;
}

/* Подтверждение */
.booking-summary {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-light);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-muted);
}

.summary-value {
    font-weight: 600;
    color: var(--primary-dark);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Успешное окно */
.success-content {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: #d4edda;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    color: #155724;
    font-size: 50px;
}

.success-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.success-message {
    color: var(--text-muted);
    margin-bottom: 25px;
}



/* Кнопки в модалке */
.modal-footer {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-footer .btn {
    flex: 1;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 480px) {
    .modal-container {
        width: 95%;
    }

    .date-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}