.mod-feedback__header {
    margin-bottom: 1rem;
}

.mod-feedback__footer-text {
    margin-top: 1rem;
    font-size: 1rem;
    color: #6c757d;
}

.mod-feedback__footer-text p {
    margin: inherit;
}

.mod-feedback__footer-text a {
    color: inherit;
    text-decoration: underline;
}

.mod-feedback,
.mod-feedback-modal {
    --fb-gap: 1rem;
    --fb-radius: 0.375rem;
    --fb-error-color: #dc3545;
    --fb-required-color: #dc3545;
    --fb-counter-color: #6c757d;
    --fb-success-color: #198754;
}

.mod-feedback--inline.mod-feedback--width-full {
    width: 100%;
}

.mod-feedback--inline.mod-feedback--width-auto {
    width: auto;
}

.mod-feedback--inline.mod-feedback--width-custom {
    width: var(--fb-inline-width, 520px);
    max-width: 100%;
}

.mod-feedback__form {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--fb-gap);
}

.mod-feedback__form--cols-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--fb-gap);
}

.mod-feedback__form--cols-2 .mod-feedback__field {
    box-sizing: border-box;
    align-self: start;
    min-width: 0;
}

.mod-feedback__form--cols-2 .mod-feedback__field--col-1 {
    grid-column: 1;
}

.mod-feedback__form--cols-2 .mod-feedback__field--col-2 {
    grid-column: 2;
}

.mod-feedback__columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--fb-column-gap, var(--fb-gap));
    align-items: start;
}

.mod-feedback__column {
    display: flex;
    flex-direction: column;
    gap: var(--fb-gap);
    min-width: 0;
    box-sizing: border-box;
}

.mod-feedback__column--1 {
    padding-right: calc(var(--fb-column-gap, var(--fb-gap)) / 2);
}

.mod-feedback__column--2 {
    padding-left: calc(var(--fb-column-gap, var(--fb-gap)) / 2);
}

.mod-feedback__column .mod-feedback__field {
    width: 100%;
}

.mod-feedback__form--cols-2 .mod-feedback__field--full {
    grid-column: 1 / -1;
}

.mod-feedback__form--cols-2 .mod-feedback-modal__footer,
.mod-feedback__form--cols-2 .mod-feedback__global-error {
    grid-column: 1 / -1;
}

.mod-feedback__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mod-feedback__field label {
    font-size: 0.9rem;
    font-weight: 500;
    color: inherit;
}

.mod-feedback__form--labels-left .mod-feedback__field {
    display: grid;
    grid-template-columns: minmax(120px, 30%) 1fr;
    column-gap: 0.75rem;
    align-items: start;
}

.mod-feedback__form--labels-left .mod-feedback__field label {
    padding-top: 0.55rem;
}

.mod-feedback__form--labels-left .mod-feedback__counter,
.mod-feedback__form--labels-left .mod-feedback__error,
.mod-feedback__form--labels-left .mod-feedback__file-hint,
.mod-feedback__form--labels-left .mod-feedback__global-error {
    grid-column: 2;
}

.mod-feedback__form--labels-left .mod-feedback__captcha,
.mod-feedback__form--labels-left .mod-feedback__submit,
.mod-feedback__form--labels-left .mod-feedback__consent,
.mod-feedback__form--labels-left .mod-feedback__field--full {
    grid-template-columns: 1fr;
}

.mod-feedback__form--labels-left .mod-feedback__captcha > *,
.mod-feedback__form--labels-left .mod-feedback__submit > *,
.mod-feedback__form--labels-left .mod-feedback__consent > *,
.mod-feedback__form--labels-left .mod-feedback__field--full > * {
    grid-column: 1;
}

.mod-feedback__label--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mod-feedback__honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.mod-feedback__required {
    color: var(--fb-required-color);
    margin-left: 0.2em;
}

.mod-feedback__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
    line-height: 1.1;
}

.mod-feedback__checkbox-label input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.mod-feedback__checkbox-label a,
.mod-feedback__consent-link {
    color: #0d6efd;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.mod-feedback__checkbox-label a:hover,
.mod-feedback__consent-link:hover {
    color: #0a58ca;
}

.mod-feedback__consent-link--empty {
    cursor: not-allowed;
    text-decoration-style: dashed;
}

.mod-feedback__input,
.mod-feedback__textarea {
    width: 100%;
    padding: 0.3rem 0.6rem;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.2;
    border: 1px solid #ced4da;
    border-radius: var(--fb-radius);
    background-color: #fff;
    color: #212529;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.mod-feedback__input:focus,
.mod-feedback__textarea:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.mod-feedback__input--error,
.mod-feedback__input--error:focus,
.mod-feedback__textarea.mod-feedback__input--error {
    border-color: var(--fb-error-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.mod-feedback__textarea {
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.mod-feedback__counter {
    font-size: 0.78rem;
    color: var(--fb-counter-color);
    text-align: right;
    margin-top: 0.1rem;
}

.mod-feedback-modal .mod-feedback__counter {
    display: none;
}

.mod-feedback__error {
    font-size: 0.82rem;
    color: var(--fb-error-color);
}

.mod-feedback__global-error {
    grid-column: 1 / -1;
    padding: 0.75rem 1rem;
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    border-radius: var(--fb-radius);
    font-size: 0.9rem;
}

.mod-feedback__submit {
    align-items: flex-start;
}

.mod-feedback__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.mod-feedback__submit-button--auto {
    width: auto !important;
    max-width: 100%;
}

.mod-feedback__submit-button--full {
    width: 100% !important;
}

.mod-feedback__submit-button--custom {
    width: var(--fb-submit-width, 240px) !important;
    max-width: 100%;
}

.mod-feedback__submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
}

.mod-feedback__modal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
}

.mod-feedback__success {
    padding: 1.5rem;
    text-align: center;
    color: var(--fb-success-color);
    font-size: 1rem;
    line-height: 1.6;
}

.mod-feedback-modal .mod-feedback__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
}

.mod-feedback-modal[hidden] {
    display: none !important;
}

.mod-feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 10500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.mod-feedback-modal.is-open {
    opacity: 1;
}

.mod-feedback-modal-open {
    overflow: hidden;
}

.mod-feedback-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.mod-feedback-modal.is-open .mod-feedback-modal__backdrop {
    opacity: 1;
}

.mod-feedback-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    outline: none;
    opacity: 0;
    transform: translateY(-0.35rem) scale(0.985);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.mod-feedback-modal.is-open .mod-feedback-modal__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.mod-feedback-modal__dialog--sm { max-width: 300px; }
.mod-feedback-modal__dialog--md { max-width: 500px; }
.mod-feedback-modal__dialog--lg { max-width: 800px; }
.mod-feedback-modal__dialog--xl { max-width: 1140px; }

.mod-feedback-modal__content {
    background: #fff;
    color: #212529;
    border-radius: var(--fb-radius);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.25);
}

.mod-feedback-modal__header,
.mod-feedback-modal__footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.mod-feedback-modal__header {
    justify-content: space-between;
    border-bottom: 1px solid #dee2e6;
}

.mod-feedback-modal__footer {
    justify-content: flex-start;
    border-top: 1px solid #dee2e6;
}

.mod-feedback-modal__title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.2;
}

.mod-feedback-modal__body {
    padding: 0 1rem 0.5rem;
}

.mod-feedback__success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--fb-success-color);
    color: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mod-feedback__captcha {
    min-height: 78px;
}

.mod-feedback__captcha--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.altcha-label {
    padding-top: 0 !important;
}

.mod-feedback__input--file {
    padding: 0.4rem 0.75rem;
    cursor: pointer;
}

.mod-feedback__file-hint {
    font-size: 0.78rem;
    color: var(--fb-counter-color);
    margin-top: 0.15rem;
}

.mod-feedback__close {
    position: relative;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    opacity: 0.6;
}
.mod-feedback__close:hover { opacity: 1; }
.mod-feedback__close::before,
.mod-feedback__close::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 1rem; height: 2px;
    background: currentColor;
    border-radius: 1px;
}
.mod-feedback__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.mod-feedback__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

@media (max-width: 575px) {
    .mod-feedback__form--labels-left .mod-feedback__field {
        display: flex;
        flex-direction: column;
    }
    .mod-feedback__form--labels-left .mod-feedback__field label {
        padding-top: 0;
    }
    .mod-feedback__form--cols-2 {
        grid-template-columns: 1fr;
    }
    .mod-feedback__columns {
        grid-template-columns: 1fr;
    }
    .mod-feedback__column--1,
    .mod-feedback__column--2 {
        padding-right: 0;
        padding-left: 0;
    }
    .mod-feedback__form--cols-2 .mod-feedback__field {
        grid-column: 1 / -1;
    }
}
