/* The form sits on the surface right under the page bar: chips, a white outlined comment box
   and the attachment block. */
.feedback-root-container {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

    /* The form reads as one centred column under the full-width page bar. */
    .feedback-root-container > * {
        width: 100%;
        max-width: 520px;
    }

.feedback-content-container {
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1 1 auto;
    min-height: 0;
    justify-content: flex-start;
}

.feedback-subtitle {
    margin: 0;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    color: rgba(84,89,107,1);
}

/* Поля и группы: mobile baseline */
.feedback-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
    justify-content: flex-start;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    min-height: 72px;
}

.field-label,
.field-label-text {
    margin: 0;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    color: rgba(84,89,107,1);
    text-align: left;
}

.field {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-sizing: border-box;
    min-height: 48px;
}

.feedback-category {
    box-sizing: border-box;
    justify-content: center;
    align-content: center;
    align-items: center;
    padding: 0 16px;
    height: 32px;
    background: var(--surface-raised);
    box-shadow: inset 0 0 0 1px var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.feedback-category[selected="true"] {
    background: var(--accent-action);
    color: #fff;
}

.feedback-input {
    box-sizing: border-box;
    border: none;
    border-radius: 10px;
    flex: 1;
    outline: 1px solid var(--accent-action);
    width: 100%;
    min-height: 48px;
    background: var(--surface-raised);
    padding: 0 12px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 15px;
    line-height: 150%;
    color: var(--text-gray-dark-color, var(--text-dark-color));
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

    .feedback-input:focus {
        outline: 2px solid var(--accent-action);
    }

.textarea-field {
    display: flex;
    width: 100%;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-sizing: border-box;
    min-height: 120px;
    align-items: stretch;
    resize: none;
}

    .textarea-field .feedback-input {
        padding: 8px;
        resize: none;
    }

/* Optional image attachment block on the feedback page. */
.feedback-image-group {
    gap: 8px;
}

.feedback-image-picker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px dashed #cfdbed;
    border-radius: 10px;
    background: var(--surface-raised);
    color: var(--text-gray-dark-color, var(--text-dark-color));
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.feedback-image-picker input[type="file"] {
    display: none;
}

.feedback-image-group .is-hidden {
    display: none;
}

.feedback-image-uploading {
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-gray-dark-color, var(--text-dark-color));
}

.feedback-image-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #20161e27;
}

.feedback-image-preview img {
    display: block;
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.feedback-image-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: white;
    color: var(--ink-500);
    font-size: 18px;
    line-height: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-image-error {
    margin: 0;
    font-family: var(--font-family);
    font-size: 13px;
    color: var(--red-color, #d23a3a);
}

/* The send action closes the screen: pinned to the foot of the sheet. */
.submit-feedback-button-container {
    width: 100%;
    height: auto;
    margin-top: auto;
    padding-top: 16px;
}

.submit-feedback-button {
    width: 100%;
    min-height: 48px;
}

@media (min-width: 768px) {


    .feedback-meta {
        flex: 0 0 40%;
        display: flex;
        flex-direction: column;
        gap: 12px;
        box-sizing: border-box;
    }

    .feedback-subtitle {
        font-size: 16px;
        max-width: 360px;
    }

    .feedback-form {
        flex: 1 1 58%;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .feedback-fields {
        max-width: 100%;
    }
}

@media (min-width: 1024px) {

    .feedback-meta {
        flex: 0 0 40%;
        display: flex;
        flex-direction: column;
        gap: 12px;
        box-sizing: border-box;
    }

    .feedback-subtitle {
        font-size: 16px;
        max-width: 360px;
    }

    .feedback-form {
        flex: 1 1 58%;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .feedback-fields {
        max-width: 100%;
    }
}