/* ===========================================================================
   Кнопка "Обратная связь" (стили в #bottom-buttons из style.css)
   =========================================================================== */
#feedback-btn {
    padding: 10px 20px;
    background: #e21429;
    color: #fff;
    border: none;
    font-size: 14px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}
#feedback-btn:hover {
    background: #c41024;
    color: #fff;
}

/* ===========================================================================
   Модальное окно формы обратной связи
   =========================================================================== */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10001;
    justify-content: center;
    align-items: center;
}
.feedback-modal.open {
    display: flex;
    animation: feedbackFadeIn 0.25s ease;
}
@keyframes feedbackFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.feedback-modal-content {
    position: relative;
    width: 420px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    padding: 28px 32px 24px;
    font-family: Arial, sans-serif;
    animation: feedbackSlideIn 0.3s ease;
    -webkit-overflow-scrolling: touch;
}
@keyframes feedbackSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.feedback-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feedback-close:hover {
    color: #e21429;
}
.feedback-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    border-bottom: 2px solid #e21429;
    padding-bottom: 10px;
}
.feedback-field {
    margin-bottom: 16px;
}
.feedback-field label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
    font-weight: bold;
}
.feedback-field .req {
    color: #e21429;
}
.feedback-field input,
.feedback-field textarea,
.feedback-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px; /* 16px+ для предотвращения зума на iOS */
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.feedback-field input:focus,
.feedback-field textarea:focus,
.feedback-field select:focus {
    outline: none;
    border-color: #188d0b;
}
.feedback-field textarea {
    resize: vertical;
}
.feedback-error {
    display: block;
    font-size: 12px;
    color: #e21429;
    margin-top: 4px;
    min-height: 14px;
}
.feedback-field input.invalid,
.feedback-field textarea.invalid,
.feedback-field select.invalid {
    border-color: #e21429;
}

.feedback-submit {
    width: 100%;
    padding: 11px;
    background: #188d0b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}
.feedback-submit:hover {
    background: #147a09;
}
.feedback-submit:disabled {
    background: #aaa;
    cursor: not-allowed;
}
.feedback-status {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    min-height: 20px;
}
.feedback-status.success {
    color: #188d0b;
}
.feedback-status.error {
    color: #e21429;
}

/* ===========================================================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (<= 768px)
   =========================================================================== */
@media screen and (max-width: 768px) {
    #feedback-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* --- Модальное окно: на весь экран --- */
    .feedback-modal {
        align-items: flex-end; /* выезжает снизу как bottom-sheet */
    }
    .feedback-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
        padding: 20px 16px 20px;
        animation: feedbackSlideUp 0.3s ease;
    }
    @keyframes feedbackSlideUp {
        from { transform: translateY(100%); opacity: 0; }
        to   { transform: translateY(0); opacity: 1; }
    }
    .feedback-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    .feedback-field {
        margin-bottom: 14px;
    }
    .feedback-field label {
        font-size: 14px;
    }
    .feedback-submit {
        padding: 14px;
        font-size: 16px;
    }
}

/* ===========================================================================
   Очень маленькие экраны (<= 380px)
   =========================================================================== */
@media screen and (max-width: 380px) {
    #feedback-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    .feedback-modal-content {
        padding: 16px 12px 16px;
    }
}
