/* Стили для оверлея и модального окна */
.kwo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.kwo-modal {
    font-family: 'Arial', sans-serif;
    max-width: 600px;
    width: 100%;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
    /* Изначально скрыто, показывается через JS */
    display: none;
    animation: kwo-modal-appear 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

@keyframes kwo-modal-appear {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.kwo-modal__header {
    margin-bottom: 30px;
    text-align: center;
}

.kwo-modal__title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    color: #333333;
    margin: 0;
}

.kwo-modal__title-accent {
    color: #C4A884;
}

/* Стили формы */
.kwo-form__step {
    display: none;
    animation: kwo-fadeIn 0.3s ease-out;
}

.kwo-form__step--active {
    display: block;
}

@keyframes kwo-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*
.kwo-form__field-group {
    margin-bottom: 20px;
}
*/

.kwo-form__label {
    display: block;
    margin: 10px 0 5px;
    font-weight: 500;
    color: #444444;
    font-size: 14px;
}

.kwo-form__label--required::after {
    content: " *";
    color: #ff4757;
}

.kwo-form__input {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid #C4A884;
    border-radius: 4px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.kwo-form__input:focus {
    outline: none;
    border-color: #C4A884;
    box-shadow: 0 0 0 2px rgba(196, 168, 132, 0.2);
}

.kwo-form__input--text,
.kwo-form__input--tel {
    height: 44px;
}

.kwo-form__input--file {
    padding: 10px;
    background: #f8f9fa;
    cursor: pointer;
}

.kwo-form__file-hint {
    font-size: 12px;
    color: #666666;
    margin-top: 5px;
}

/* Сетка */
.kwo-form__row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.kwo-form__col {
    padding: 0 10px;
    box-sizing: border-box;
}

.kwo-form__col--50 {
    width: 50%;
}

/* Чекбокс */
.kwo-form__checkbox {
    display: flex;
    align-items: center;
}

.kwo-form__checkbox-input {
    margin: 3px 10px 0 0;
    cursor: pointer;
    width: 30px;
}

.kwo-form__checkbox-label {
    font-size: 13px;
    color: #555555;
    line-height: 1.4;
    cursor: pointer;
}

/* Кнопки */
.kwo-form__buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 0px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
}

.kwo-form__button {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.kwo-form__button--next,
.kwo-form__button--submit {
    background: #C4A884;
    color: #ffffff;
}

.kwo-form__button--next:hover,
.kwo-form__button--submit:hover {
    background: #b3976e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 168, 132, 0.3);
}

.kwo-form__button--next:focus,
.kwo-form__button--submit:focus {
    background: #C4A884;
}

.kwo-form__button--back {
    background: #f8f9fa;
    color: #555555;
    border: 1px solid #dddddd;
}

.kwo-form__button--back:hover {
    background: #e9ecef;
    border-color: #cccccc;
}

.kwo-form__button-text {
    display: inline-block;
}

/* Индикатор шагов */
.kwo-form__steps-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
}

.kwo-form__step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dddddd;
    cursor: pointer;
    transition: background 0.3s;
}

.kwo-form__step-dot--active {
    background: #C4A884;
}

.kwo-form__step-dot:hover {
    background: #b3976e;
}

/* Кнопка закрытия */
.kwo-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.kwo-modal__close:hover {
    background-color: #f8f9fa;
    color: #333;
}

/* Адаптивность */
@media (max-width: 768px) {
    .kwo-modal-overlay {
        padding: 10px;
    }
    
    .kwo-modal {
        padding: 20px;
        max-height: 95vh;
    }

    .kwo-modal__title {
        font-size: 18px;
    }

    .kwo-form__col--50 {
        width: 100%;
        margin-bottom: 0px;
    }

    .kwo-form__row {
        margin: 0;
    }

    .kwo-form__col {
        padding: 0;
    }

    .kwo-form__buttons {
        flex-direction: column;
    }

    .kwo-form__button {
        width: 100%;
    }
}

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

    .kwo-form__input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .kwo-modal__close {
        top: 10px;
        right: 10px;
        width: 25px;
        height: 25px;
        font-size: 18px;
    }
}

/* Состояния валидации */
.kwo-form__input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ff4757;
}

.kwo-form__input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #C4A884;
}
