.feedback-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    background: #ffffff;
    padding: 0.35rem 0.45rem 0.35rem 0.85rem;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(31, 41, 55, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #2f2f2f;
}

.feedback-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(31, 41, 55, 0.18);
}

.feedback-trigger-label {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.feedback-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ff7a5c;
    color: #ffffff;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.45);
}

.feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1050;
}

.feedback-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.feedback-panel {
    --feedback-ink: #1f2937;
    --feedback-muted: #6b7280;
    --feedback-border: rgba(17, 24, 39, 0.08);
    --feedback-accent: #ff7a5c;
    --feedback-card: #ffffff;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(420px, 100%);
    padding: 1.75rem 1.5rem;
    background: #f3f6fb;
    transform: translateX(110%);
    transition: transform 0.35s ease;
    z-index: 1060;
    display: flex;
    align-items: center;
}

.feedback-panel.is-open {
    transform: translateX(0);
}

.feedback-card {
    position: relative;
    background: var(--feedback-card);
    border-radius: 24px;
    padding: 2rem 1.85rem 1.75rem;
    width: 100%;
    box-shadow: 0 18px 40px rgba(31, 41, 55, 0.12);
}

.feedback-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    border: none;
    background: #f3f4f6;
    color: #4b5563;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feedback-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--feedback-ink);
    margin-bottom: 0.25rem;
}

.feedback-header p {
    color: var(--feedback-muted);
    margin-bottom: 1.1rem;
    font-size: 0.9rem;
}

.feedback-section-label {
    font-weight: 600;
    color: var(--feedback-ink);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.feedback-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.feedback-option {
    border: 1px solid var(--feedback-border);
    border-radius: 16px;
    padding: 0.85rem 0.85rem 0.75rem;
    background: #ffffff;
    text-align: left;
    display: grid;
    gap: 0.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.feedback-option.is-selected {
    border-color: var(--feedback-accent);
    box-shadow: 0 10px 18px rgba(255, 122, 92, 0.16);
    background: #fff6f2;
}

.feedback-option-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.feedback-option-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--feedback-ink);
}

.feedback-option-sub {
    font-size: 0.75rem;
    color: var(--feedback-muted);
}

.option-suggestion {
    background: #fff2cc;
    color: #b45309;
}

.option-bug {
    background: #ffe4e6;
    color: #e11d48;
}

.option-love {
    background: #ffe4f0;
    color: #db2777;
}

.option-question {
    background: #e0f2fe;
    color: #2563eb;
}

.feedback-field {
    margin-bottom: 0.75rem;
}

.feedback-input {
    width: 100%;
    border: 1px solid var(--feedback-border);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-input:focus {
    outline: none;
    border-color: var(--feedback-accent);
    box-shadow: 0 0 0 3px rgba(255, 122, 92, 0.18);
}

.feedback-error {
    min-height: 1.2rem;
    font-size: 0.8rem;
    color: #dc2626;
    margin-bottom: 0.75rem;
}

.feedback-submit {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-weight: 600;
    background: #d1d5db;
    color: #ffffff;
    transition: background 0.2s ease, transform 0.2s ease;
}

.feedback-submit.is-ready {
    background: var(--feedback-accent);
    box-shadow: 0 12px 24px rgba(255, 122, 92, 0.25);
}

.feedback-submit.is-ready:hover {
    transform: translateY(-1px);
}

.feedback-submit:disabled {
    cursor: not-allowed;
}

.feedback-success {
    display: none;
    text-align: center;
    color: var(--feedback-ink);
}

.feedback-success.is-visible {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.feedback-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feedback-success h3 {
    font-weight: 700;
    margin-bottom: 0;
}

.feedback-success p {
    color: var(--feedback-muted);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.feedback-link {
    border: none;
    background: none;
    color: var(--feedback-accent);
    font-weight: 600;
    text-decoration: underline;
}

.feedback-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .feedback-panel {
        padding: 1.25rem;
    }

    .feedback-card {
        padding: 1.75rem 1.35rem 1.5rem;
        border-radius: 20px;
    }

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