.sg-ff-host[hidden],
#sgFeatureFeedbackOverview[hidden],
#sgFeatureFeedbackDocument[hidden],
#sgFeatureFeedbackTranslate[hidden],
#sgFeatureFeedbackXray[hidden],
#sgFeatureFeedbackAudio[hidden],
#sgFeatureFeedbackAnalysis[hidden] {
    display: none !important;
}

.sg-ff {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.sg-ff__label {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--ast-global-color-3, #656d76);
}

.sg-ff__bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sg-ff__votes {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.sg-ff__btn {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sg-z2-h, 32px);
    min-width: var(--sg-z2-h, 32px);
    height: var(--sg-z2-h, 32px);
    min-height: var(--sg-z2-h, 32px);
    max-height: var(--sg-z2-h, 32px);
    margin: 0;
    padding: 0;
    gap: 0;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    line-height: 1;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
}

#sgFeatureFeedbackOverview .sg-ff__label {
    display: none;
}

.sg-ff__btn:hover,
.sg-ff__btn.is-on,
.sg-ff__btn.active,
.sg-ff__btn[aria-pressed="true"] {
    background: color-mix(in srgb, var(--ast-global-color-0, #e86202) 12%, white);
    border-color: var(--ast-global-color-0, #e86202);
    color: var(--ast-global-color-0, #e86202);
}

.sg-ff__btn.is-on:focus,
.sg-ff__btn.active:focus,
.sg-ff__btn[aria-pressed="true"]:focus,
.sg-ff__btn.is-on:focus-visible,
.sg-ff__btn.active:focus-visible,
.sg-ff__btn[aria-pressed="true"]:focus-visible {
    background: color-mix(in srgb, var(--ast-global-color-0, #e86202) 12%, white);
    border-color: var(--ast-global-color-0, #e86202);
    color: var(--ast-global-color-0, #e86202);
}

.sg-ff__btn.is-saving {
    opacity: 0.7;
}

.sg-ff__form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(360px, 100%);
}

.sg-ff__form[hidden] {
    display: none !important;
}

.sg-ff__text {
    width: 100%;
    min-height: 56px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--ast-global-color-0, #e86202) 18%, var(--ast-global-color-5, #e5e7eb));
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    resize: vertical;
}

.sg-ff__form-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.sg-ff__send {
    font-weight: 500;
}

.sg-ff__dismiss {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--ast-global-color-3, #656d76);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sg-ff__dismiss:hover {
    color: var(--ast-global-color-0, #e86202);
}

.sg-ff__status {
    font-size: 12px;
    line-height: 1.2;
    color: var(--ast-global-color-3, #656d76);
    white-space: nowrap;
}

.sg-ff__status:empty {
    display: none;
}

.sg-overview__feedback {
    margin: 28px 0 0;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--ast-global-color-0, #e86202) 16%, var(--ast-global-color-5, #e5e7eb));
    border-radius: 12px;
    background: #fff;
}

.sg-overview__feedback-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
}

.sg-ff-toolbar-host,
#sgFeatureFeedbackDocument,
#sgFeatureFeedbackTranslate,
#sgFeatureFeedbackXray,
#sgFeatureFeedbackAudio,
#sgFeatureFeedbackAnalysis {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sg-ff-toolbar-host .sg-ff__label,
#sgFeatureFeedbackDocument .sg-ff__label,
#sgFeatureFeedbackTranslate .sg-ff__label,
#sgFeatureFeedbackXray .sg-ff__label,
#sgFeatureFeedbackAudio .sg-ff__label,
#sgFeatureFeedbackAnalysis .sg-ff__label {
    display: none;
}

.sg-ff-toolbar-host .sg-ff,
#sgFeatureFeedbackDocument .sg-ff,
#sgFeatureFeedbackTranslate .sg-ff,
#sgFeatureFeedbackXray .sg-ff,
#sgFeatureFeedbackAudio .sg-ff,
#sgFeatureFeedbackAnalysis .sg-ff {
    flex-direction: row;
    align-items: center;
}

.sg-ff-toolbar-host .sg-ff__form,
#sgFeatureFeedbackDocument .sg-ff__form,
#sgFeatureFeedbackTranslate .sg-ff__form,
#sgFeatureFeedbackXray .sg-ff__form,
#sgFeatureFeedbackAudio .sg-ff__form,
#sgFeatureFeedbackAnalysis .sg-ff__form {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    width: min(320px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--ast-global-color-0, #e86202) 20%, var(--ast-global-color-5, #e5e7eb));
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.toolbar-group-feedback {
    position: relative;
    margin-left: auto;
    flex: 0 0 auto;
    width: auto;
}

#agentPreviewToolbar .toolbar-group-feedback,
#agentPreviewToolbar .sg-ff-toolbar-host,
#agentPreviewToolbar .sg-ff,
#agentPreviewToolbar .sg-ff__bar,
#agentPreviewToolbar .sg-ff__votes {
    flex-wrap: nowrap;
    width: auto;
    max-width: none;
}

#agentPreviewToolbar .sg-ff {
    flex-direction: row;
    align-items: center;
}


.sg-ff-host--compact,
.sg-audio-actions .sg-ff-host,
.sg-audio-clip-actions .sg-ff-host {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}

.sg-ff-host--compact .sg-ff__form,
.sg-audio-actions .sg-ff-host .sg-ff__form,
.sg-audio-clip-actions .sg-ff-host .sg-ff__form,
.sg-audio-script-actions .sg-ff-host .sg-ff__form,
.sg-audio-part-editor-bar .sg-ff-host .sg-ff__form {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    width: min(320px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--ast-global-color-0, #e86202) 20%, var(--ast-global-color-5, #e5e7eb));
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.sg-audio-script-actions .sg-ff-host,
.sg-audio-part-editor-bar .sg-ff-host {
    margin-left: auto;
}

.sg-ff--pulse {
    animation: sg-ff-heartbeat 0.7s ease-in-out 3;
}

@keyframes sg-ff-heartbeat {
    0%,
    100% {
        transform: scale(1);
        box-shadow: none;
    }
    40% {
        transform: scale(1.08);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--ast-global-color-0, #e86202) 22%, transparent);
    }
}

#scribigo-agent-chat:not([data-preview-tab="preview"]) #sgFeatureFeedbackDocument,
#scribigo-agent-chat:not([data-preview-tab="translate"]) #sgFeatureFeedbackTranslate,
#scribigo-agent-chat:not([data-preview-tab="bible"]) #sgFeatureFeedbackXray,
#scribigo-agent-chat:not([data-preview-tab="audio"]) #sgFeatureFeedbackAudio,
#scribigo-agent-chat:not([data-preview-tab="analysis"]) #sgFeatureFeedbackAnalysis {
    display: none !important;
}

.command-card .agent-card-rating {
    display: none !important;
}
