/* ==========================================================
   ОСНОВНОЙ БЛОК
   ========================================================== */

.feedback-form {
    position: relative;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}


/* ==========================================================
   ЗАГОЛОВОК
   ========================================================== */

.feedback-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 .75rem;
    padding: 0;
    background: transparent;
}


.feedback-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    min-width: 42px;

    border-radius: 50%;

    color: var(--bs-primary);

    background: rgba(
        var(--bs-primary-rgb),
        .12
    );

    font-size: 1.05rem;
}


.feedback-header-content {
    min-width: 0;
}


.feedback-title {
    margin: 0 0 .2rem;
    padding: 0;

    color: var(
        --bs-heading-color,
        var(--bs-body-color)
    );

    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 600;
}


.feedback-intro {
    margin: 0;
    padding: 0;

    color: var(--bs-secondary-color);

    font-size: .95rem;
    line-height: 1.45;
}


/* ==========================================================
   ПРЕДУПРЕЖДЕНИЕ
   ========================================================== */

.feedback-note {
    margin: 0 0 1.5rem;
    padding: .65rem .75rem;

    border-left: 3px solid var(--bs-primary);
    border-radius: 0 .4rem .4rem 0;

    color: var(--bs-secondary-color);

    background: rgba(
        var(--bs-primary-rgb),
        .05
    );

    font-size: .875rem;
    line-height: 1.5;
}


/* ==========================================================
   СЕТКА
   ========================================================== */

.feedback-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1rem;

    margin-bottom: 0;
}


/* ==========================================================
   ПОЛЯ
   ========================================================== */

.feedback-field {
    min-width: 0;
    margin-bottom: 1rem;
}


.feedback-message {
    margin-bottom: 1.5rem;
}


.form-label {
    display: block;

    margin-bottom: .4rem;

    color: var(--bs-body-color);

    font-weight: 500;
}


.required-mark {
    color: var(--bs-danger);
    margin-left: .15rem;
}


.form-text {
    margin-top: .35rem;

    color: var(--bs-secondary-color);

    line-height: 1.4;
}


/* ==========================================================
   ПОЛУЧАТЕЛЬ DLE
   ========================================================== */

.category-select select {
    width: 100%;
}


/* ==========================================================
   INPUT / TEXTAREA
   ========================================================== */

.feedback-form .form-control,
.feedback-form select {
    border-radius: .6rem;
}


.feedback-form .form-control:focus,
.feedback-form select:focus {
    border-color: var(--bs-primary);

    box-shadow:
        0 0 0 .2rem
        rgba(
            var(--bs-primary-rgb),
            .15
        );
}


#feedback-message {
    min-height: 150px;
    resize: vertical;
}


/* ==========================================================
   ВЛОЖЕНИЯ
   ========================================================== */

.feedback-fieldset {
    min-width: 0;

    padding: 0;
    margin: 0 0 1.5rem;

    border: 0;
}


.feedback-file-label {
    display: flex;
    align-items: center;

    gap: .75rem;

    width: 100%;
    min-height: 58px;

    padding: .75rem 1rem;

    border: 1px dashed
        var(--bs-border-color);

    border-radius: .75rem;

    background: var(--bs-secondary-bg);

    cursor: pointer;

    transition:
        border-color .15s ease,
        background-color .15s ease;
}


.feedback-file-label:hover {
    border-color: var(--bs-primary);

    background:
        rgba(
            var(--bs-primary-rgb),
            .05
        );
}


.feedback-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    min-width: 38px;

    border-radius: .6rem;

    color: var(--bs-primary);

    background:
        rgba(
            var(--bs-primary-rgb),
            .1
        );

    font-size: 1.1rem;
}


.feedback-file-text {
    min-width: 0;
}


.feedback-file-label strong {
    display: block;

    color: var(--bs-body-color);

    font-weight: 500;
}


.feedback-file-description {
    display: block;

    margin-top: .15rem;

    color: var(--bs-secondary-color);

    font-size: .85rem;
}


/* Скрываем настоящий input */

.feedback-file-input {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


/* Фокус при TAB */

.feedback-file-input:focus-visible
~ .form-text {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}


/* ==========================================================
   CAPTCHA
   ========================================================== */

.feedback-captcha-row {
    display: flex;

    align-items: stretch;

    gap: .75rem;

    flex-wrap: wrap;
}


.feedback-captcha-image {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 176px;
    height: 88px;

    min-width: 176px;

    overflow: hidden;

    border: 1px solid
        var(--bs-border-color);

    border-radius: .625rem;

    background: var(--bs-secondary-bg);
}


.feedback-captcha-image img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
}


.feedback-captcha-input {
    width: 158px;
    min-width: 0;
}


.feedback-captcha-input .form-control {
    min-height: 88px;
    height: 88px;
}


/* ==========================================================
   HONEYPOT
   ========================================================== */

.feedback-honeypot {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


/* ==========================================================
   VISUALLY HIDDEN
   ========================================================== */

.visually-hidden {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


/* ==========================================================
   КНОПКА
   ========================================================== */

.feedback-actions {
    display: flex;

    justify-content: flex-start;

    margin-top: .25rem;
}


.feedback-submit {
    min-height: 44px;

    padding: .6rem 1.25rem;

    border-radius: .6rem;
}


/* ==========================================================
   МОБИЛЬНЫЕ
   ========================================================== */

@media (max-width: 767.98px) {

    .feedback-form {
        padding: 1rem;
        border-radius: .875rem;
    }


    .feedback-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }


    .feedback-header {
        align-items: flex-start;
    }


    .feedback-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }


    .feedback-title {
        font-size: 1.2rem;
    }


    .feedback-intro {
        font-size: .9rem;
    }


    .feedback-note {
        font-size: .825rem;
    }


    .feedback-captcha-row {
        width: 100%;
    }


    .feedback-captcha-image {
        width: 140px;
        height: 70px;
        min-width: 140px;
    }


    .feedback-captcha-input {
        flex: 1 1 130px;
        width: auto;
    }


    .feedback-captcha-input .form-control {
        min-height: 70px;
        height: 70px;
    }


    .feedback-actions {
        display: block;
    }


    .feedback-submit {
        width: 100%;
    }

}


/* ==========================================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
   ========================================================== */

@media (max-width: 380px) {

    .feedback-form {
        padding: .85rem;
    }


    .feedback-header {
        gap: .6rem;
    }


    .feedback-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }


    .feedback-title {
        font-size: 1.1rem;
    }


    .feedback-intro {
        font-size: .85rem;
    }


    .feedback-captcha-row {
        flex-direction: column;
    }


    .feedback-captcha-image {
        width: 176px;
        height: 88px;
        min-width: 176px;
    }


    .feedback-captcha-input {
        width: 100%;
    }


    .feedback-captcha-input .form-control {
        min-height: 48px;
        height: 48px;
    }

}


/* ==========================================================
   ОТКЛЮЧЕНИЕ АНИМАЦИИ
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .feedback-file-label {
        transition: none;
    }

}