.cm-feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.cm-feedback-overlay.is-open {
    display: flex;
}

.cm-feedback-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: none;
    overflow: visible;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    padding: 1.45rem 1.6rem 1.4rem;
    color: #e2e8f0;
}

.cm-feedback-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.cm-feedback-close:hover {
    background: rgba(148, 163, 184, 0.22);
    color: #fff;
}

.cm-feedback-kicker {
    margin: 0 0 0.35rem;
    color: #60a5fa;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.cm-feedback-dialog h2 {
    margin: 0 0 0.45rem;
    font-size: 1.25rem;
    color: #fff;
}

.cm-feedback-lead {
    margin: 0 0 0.75rem;
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.5;
}

.cm-feedback-errors {
    margin-bottom: 0.9rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #fecaca;
    font-size: 0.82rem;
}

.cm-feedback-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

.cm-feedback-form label {
    display: block;
    margin: 0 0 0.3rem;
    color: #cbd5e1;
    font-size: 0.82rem;
}

.cm-feedback-form > label {
    margin-top: 0.65rem;
}

.cm-feedback-form label span {
    color: #64748b;
    font-weight: 400;
}

.cm-feedback-form input,
.cm-feedback-form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    padding: 0.65rem 0.8rem;
    font-size: 0.92rem;
}

.cm-feedback-form input:focus,
.cm-feedback-form textarea:focus {
    outline: 0;
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.cm-feedback-form textarea {
    min-height: 7.5rem;
    resize: vertical;
}

.cm-feedback-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1rem;
    margin-bottom: 0.35rem;
}

.cm-feedback-stars-label {
    margin: 0.7rem 0 0.25rem;
    color: #cbd5e1;
    font-size: 0.82rem;
}

.cm-feedback-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}

.cm-feedback-stars button {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #fbbf24;
    font-size: 1.35rem;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.cm-feedback-stars button i.is-empty,
.cm-feedback-stars button[aria-pressed="false"] i.bi-star {
    color: #475569;
}

.cm-feedback-form .btn {
    margin-top: 0.95rem;
}

.cm-feedback-launch {
    position: fixed;
    right: 0;
    top: 50%;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.85rem 0.58rem 0.95rem;
    border: 1px solid rgba(147, 197, 253, 0.45);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
    box-shadow: -8px 12px 28px rgba(37, 99, 235, 0.28);
    cursor: pointer;
    transition: background 0.15s, padding 0.15s, box-shadow 0.15s;
}

.cm-feedback-launch i {
    font-size: 0.95rem;
    transform: rotate(90deg);
}

.cm-feedback-launch:hover,
.cm-feedback-launch:focus-visible {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    padding-left: 0.72rem;
    color: #fff;
    outline: 0;
    box-shadow: -10px 14px 32px rgba(37, 99, 235, 0.38);
}

body:has(.cm-feedback-overlay.is-open) .cm-feedback-launch {
    visibility: hidden;
}

.cm-feedback-toast {
    position: fixed;
    right: 1rem;
    bottom: 1.25rem;
    z-index: 1070;
    max-width: min(360px, calc(100vw - 2rem));
    margin: 0;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: rgba(6, 78, 59, 0.94);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #d1fae5;
    font-size: 0.86rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

@media (max-width: 640px) {
    .cm-feedback-launch {
        padding: 0.7rem 0.48rem 0.78rem;
        font-size: 0.7rem;
        letter-spacing: 0.1em;
    }

    .cm-feedback-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    .cm-feedback-launch,
    .cm-feedback-toast,
    .cm-feedback-overlay {
        display: none !important;
    }
}
