.training-feedback {
    position: fixed;
    z-index: 7000;
    inset: auto 16px 16px;
    display: flex;
    justify-content: center;
    color: #1c1c1e;
    font: 14px/1.4 -apple-system, BlinkMacSystemFont, sans-serif;
    pointer-events: none;
}

.feedback-card {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 22px;
    background: rgba(250, 250, 252, .96);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
    backdrop-filter: blur(22px);
    pointer-events: auto;
}

.feedback-card h2 {
    margin: 0 32px 16px 0;
    font-size: 18px;
    line-height: 1.25;
}

.feedback-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 24px;
    cursor: pointer;
}

.feedback-card fieldset {
    min-width: 0;
    margin: 0 0 13px;
    padding: 0;
    border: 0;
}

.feedback-card legend,
.feedback-note,
.feedback-contact label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.feedback-card small {
    display: block;
    color: #74747a;
    font-size: 12px;
    font-weight: 400;
}

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

.feedback-ratings label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 4px;
    border: 1px solid #dedee3;
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
}

.feedback-ratings input,
.feedback-consent input {
    accent-color: #007aff;
}

.feedback-ratings span {
    font-size: 20px;
}

.feedback-ratings small {
    width: 100%;
    text-align: center;
}

.feedback-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.feedback-topics label {
    cursor: pointer;
}

.feedback-topics input {
    position: absolute;
    opacity: 0;
}

.feedback-topics span {
    display: block;
    padding: 6px 10px;
    border: 1px solid #dedee3;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
}

.feedback-topics input:checked + span {
    border-color: #007aff;
    background: #eaf3ff;
    color: #0064d1;
}

.feedback-note textarea,
.feedback-contact input {
    box-sizing: border-box;
    width: 100%;
    margin-top: 5px;
    padding: 9px 10px;
    border: 1px solid #d5d5da;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    resize: vertical;
}

.feedback-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.feedback-error {
    min-height: 1.2em;
    margin: 4px 0;
    color: #b42318;
    font-size: 12px;
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.feedback-actions button,
.feedback-card [data-done] {
    padding: 9px 16px;
    border: 0;
    border-radius: 12px;
    background: #e9e9ed;
    font: inherit;
    cursor: pointer;
}

.feedback-actions [type="submit"],
.feedback-card [data-done] {
    background: #007aff;
    color: #fff;
}

.feedback-actions button:disabled {
    opacity: .55;
}

@media (max-width: 520px) {
    .training-feedback {
        inset: auto 8px 8px;
    }

    .feedback-card {
        max-height: calc(100dvh - 16px);
        padding: 18px;
        border-radius: 19px;
    }
}
