.feedback-widget[hidden],
.feedback-panel[hidden],
.feedback-previews[hidden],
.feedback-message[hidden] {
    display: none !important;
}

.feedback-widget {
    position: fixed;
    right: 24px;
    bottom: 26px;
    z-index: 4200;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
}

.feedback-launcher-wrap {
    position: relative;
}

.feedback-launcher {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    border: 1px solid rgba(90, 117, 55, 0.3);
    border-radius: 19px;
    background: rgba(252, 253, 249, 0.97);
    padding: 9px 17px 9px 9px;
    color: #314029;
    box-shadow: 0 15px 36px rgba(43, 59, 34, 0.2);
    cursor: pointer;
    animation: feedback-float 4.2s ease-in-out infinite;
    backdrop-filter: blur(12px);
    transition: width 180ms ease, min-width 180ms ease, padding 180ms ease,
        border-radius 180ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.feedback-launcher:hover {
    border-color: #78934c;
    box-shadow: 0 18px 40px rgba(43, 59, 34, 0.26);
}

.feedback-launcher-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #617d3d, #86a654);
    color: #fff;
    box-shadow: 0 8px 18px rgba(91, 119, 56, 0.24);
}

.feedback-launcher-icon .icon {
    width: 21px;
    height: 21px;
}

.feedback-launcher-copy {
    display: grid;
    gap: 3px;
    text-align: left;
}

.feedback-launcher-copy small {
    color: #82916f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.feedback-launcher-copy strong {
    font-size: 13px;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.feedback-widget-tool {
    position: absolute;
    top: -11px;
    z-index: 2;
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 1px solid rgba(102, 124, 75, 0.3);
    border-radius: 8px;
    background: rgba(252, 253, 249, 0.98);
    color: #60734f;
    box-shadow: 0 5px 14px rgba(43, 59, 34, 0.16);
    cursor: pointer;
}

.feedback-widget-tool:hover,
.feedback-widget-tool:focus-visible {
    border-color: #78934c;
    background: #f1f5ec;
}

.feedback-widget-tool:focus-visible {
    outline: 2px solid #78934c;
    outline-offset: 2px;
}

.feedback-drag-handle {
    right: 24px;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.feedback-drag-handle:active,
.feedback-widget.is-dragging .feedback-drag-handle {
    cursor: grabbing;
}

.feedback-drag-handle span {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    background-image: radial-gradient(circle, currentColor 1.3px, transparent 1.4px);
    background-position: 0 0;
    background-size: 5px 5px;
    opacity: 0.86;
}

.feedback-minimize {
    right: -7px;
}

.feedback-minimize .icon {
    width: 12px;
    height: 12px;
    transform: rotate(90deg);
    transition: transform 180ms ease;
}

.feedback-widget.is-minimized .feedback-launcher {
    width: 56px;
    min-width: 56px;
    min-height: 56px;
    gap: 0;
    border-radius: 18px;
    padding: 6px;
}

.feedback-widget.is-minimized .feedback-launcher-copy {
    display: none;
}

.feedback-widget.is-minimized .feedback-launcher-icon {
    width: 42px;
    height: 42px;
}

.feedback-widget.is-minimized .feedback-minimize .icon {
    transform: rotate(-90deg);
}

.feedback-widget.is-dragging .feedback-launcher {
    animation: none;
}

.feedback-widget.is-open .feedback-launcher-wrap {
    display: none;
}

.feedback-panel {
    width: min(430px, calc(100vw - 32px));
    max-height: calc(100dvh - 42px);
    overflow-y: auto;
    border: 1px solid #dce2d7;
    border-radius: 21px;
    background: #fbfcf8;
    box-shadow: 0 24px 65px rgba(31, 43, 25, 0.24);
}

.feedback-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 23px 18px;
    border-bottom: 1px solid #e5e9e1;
    background: linear-gradient(145deg, #f2f6ec, #fafbf7);
}

.feedback-panel-header p {
    margin: 0 0 4px;
    color: #718b4b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.feedback-panel-header h2 {
    margin: 0;
    color: #2b3825;
    font-size: 20px;
    letter-spacing: -0.035em;
}

.feedback-panel-header span {
    display: block;
    margin-top: 6px;
    color: #7c8676;
    font-size: 11px;
}

.feedback-panel-header button {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #66705f;
    cursor: pointer;
}

.feedback-panel-header button:hover {
    background: #e8eee1;
}

.feedback-form {
    display: grid;
    gap: 17px;
    padding: 21px 23px 23px;
}

.feedback-form > label {
    position: relative;
    display: grid;
    gap: 7px;
}

.feedback-form > label > span,
.feedback-capture-heading > span {
    color: #4b5745;
    font-size: 12px;
    font-weight: 750;
}

.feedback-form label b,
.feedback-capture-heading i {
    color: #78934d;
    font-size: 9px;
    font-style: normal;
}

.feedback-form input,
.feedback-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d8ded3;
    border-radius: 11px;
    background: #fff;
    color: #2d3629;
    padding: 12px 13px;
    font: inherit;
    font-size: 13px;
    line-height: 1.55;
    outline: none;
    resize: vertical;
}

.feedback-form input {
    height: 44px;
}

.feedback-form textarea {
    min-height: 126px;
    max-height: 260px;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
    border-color: #78934c;
    box-shadow: 0 0 0 3px rgba(120, 147, 76, 0.13);
}

.feedback-form > label > small {
    position: absolute;
    right: 10px;
    bottom: -16px;
    color: #9ca397;
    font-size: 9px;
}

.feedback-form label em {
    font-style: normal;
}

.feedback-classification-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.feedback-classification-grid fieldset {
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.feedback-classification-grid legend {
    margin-bottom: 8px;
    color: #4b5745;
    font-size: 12px;
    font-weight: 750;
}

.feedback-choice-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.feedback-choice-group label {
    display: block;
    min-width: 0;
    cursor: pointer;
}

.feedback-choice-group input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: -1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.feedback-choice-group span {
    display: grid;
    min-height: 36px;
    place-items: center;
    border: 1px solid #d8ded3;
    border-radius: 9px;
    background: #fff;
    color: #687362;
    font-size: 11px;
    font-weight: 700;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.feedback-choice-group label:hover span {
    border-color: #aab99d;
    background: #f6f8f3;
}

.feedback-choice-group input:focus-visible + span {
    outline: 2px solid #78934c;
    outline-offset: 2px;
}

.feedback-choice-group input:checked + span {
    border-color: #718d48;
    background: #edf3e7;
    color: #4f6a31;
    box-shadow: inset 0 0 0 1px rgba(113, 141, 72, 0.08);
}

.feedback-choice-group.priority input[value="HIGH"]:checked + span {
    border-color: #d18a31;
    background: #fff6e7;
    color: #9a5a12;
}

.feedback-choice-group.priority input[value="URGENT"]:checked + span {
    border-color: #ce655d;
    background: #fff0ee;
    color: #a83d35;
}

.feedback-capture-section {
    display: grid;
    gap: 10px;
    margin-top: 3px;
}

.feedback-capture-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.feedback-capture-heading small {
    color: #939c8e;
    font-size: 9px;
}

.feedback-capture-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.feedback-capture-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 39px;
    border: 1px solid #d7ded2;
    border-radius: 9px;
    background: #fff;
    color: #566350;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.feedback-capture-actions button:hover {
    border-color: #9eb18d;
    background: #f4f7f0;
}

.feedback-capture-actions .icon {
    width: 15px;
    height: 15px;
}

.feedback-dropzone {
    border: 1px dashed #cad4c1;
    border-radius: 9px;
    background: #f7f9f4;
    color: #879080;
    padding: 10px;
    font-size: 10px;
    text-align: center;
    transition: border-color 140ms ease, background 140ms ease;
}

.feedback-dropzone.is-dragging {
    border-color: #759248;
    background: #edf3e7;
}

.feedback-previews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.feedback-preview {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid #dce2d7;
    border-radius: 9px;
    background: #edf0e9;
}

.feedback-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feedback-preview button {
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: rgba(35, 42, 32, 0.76);
    color: #fff;
    cursor: pointer;
}

.feedback-preview .icon {
    width: 13px;
    height: 13px;
}

.feedback-message {
    margin: 0;
    border-radius: 9px;
    background: #fff0ee;
    color: #a8443b;
    padding: 10px 11px;
    font-size: 11px;
    line-height: 1.45;
}

.feedback-message.is-success {
    background: #edf5e7;
    color: #527235;
}

.feedback-form-actions {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 9px;
}

.feedback-form-actions button {
    min-height: 43px;
    border-radius: 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.feedback-cancel {
    border: 1px solid #d6ddd1;
    background: #fff;
    color: #667060;
}

.feedback-submit {
    border: 1px solid #647f3f;
    background: #718d48;
    color: #fff;
}

.feedback-submit:hover {
    background: #627c3d;
}

.feedback-form button:disabled,
.feedback-form input:disabled,
.feedback-form textarea:disabled {
    cursor: wait;
    opacity: 0.58;
}

@keyframes feedback-float {
    0%, 100% { box-shadow: 0 15px 36px rgba(43, 59, 34, 0.2); }
    50% { box-shadow: 0 19px 42px rgba(43, 59, 34, 0.27); }
}

@media (prefers-reduced-motion: reduce) {
    .feedback-launcher {
        animation: none;
    }

    .feedback-launcher,
    .feedback-minimize .icon {
        transition: none;
    }
}

@media (max-width: 620px) {
    .feedback-widget {
        right: 12px;
        bottom: 14px;
    }

    .feedback-launcher {
        min-height: 56px;
        border-radius: 17px;
    }

    .feedback-launcher-icon {
        width: 39px;
        height: 39px;
    }

    .feedback-widget.is-minimized .feedback-launcher {
        width: 52px;
        min-width: 52px;
        min-height: 52px;
    }

    .feedback-widget.is-minimized .feedback-launcher-icon {
        width: 38px;
        height: 38px;
    }

    .feedback-panel {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 28px);
        border-radius: 18px;
    }

    .feedback-panel-header,
    .feedback-form {
        padding-right: 18px;
        padding-left: 18px;
    }
}

@media (max-width: 390px) {
    .feedback-classification-grid {
        grid-template-columns: 1fr;
    }

    .feedback-choice-group {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
