/* Compact floating feedback button + modal */

.fb-fab {
    position: fixed;
    right: 14px;
    bottom: 72px;
    z-index: 10050;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #15803d);
    box-shadow: 0 6px 18px rgba(15, 118, 110, 0.35);
    cursor: pointer;
    line-height: 1;
}

.fb-fab:hover {
    background: linear-gradient(135deg, #0d9488, #16a34a);
    color: #fff;
}

.fb-fab i {
    font-size: 13px;
}

.fb-fab-close {
    position: fixed;
    right: 10px;
    bottom: 104px;
    z-index: 10051;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: #334155;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    padding: 0;
    cursor: pointer;
    opacity: 0.75;
}

.fb-fab-close:hover {
    opacity: 1;
    background: #0f172a;
}

.fb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 10060;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.fb-overlay.is-open {
    display: flex;
}

.fb-modal {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    animation: fbPop 0.28s ease;
}

@keyframes fbPop {
    from { transform: translateY(12px) scale(0.96); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.fb-modal-head {
    background: linear-gradient(135deg, #0f766e 0%, #15803d 55%, #22c55e 100%);
    color: #fff;
    padding: 18px 20px 16px;
    position: relative;
}

.fb-modal-head h3 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
}

.fb-modal-head p {
    margin: 0;
    font-size: 13px;
    opacity: 0.95;
    line-height: 1.4;
}

.fb-modal-x {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: rgba(255,255,255,0.2);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 26px;
    cursor: pointer;
}

.fb-modal-body {
    padding: 16px 18px 18px;
}

.fb-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin: 10px 0 6px;
}

.fb-label .req { color: #dc2626; }

.fb-stars {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.fb-star {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.12s, transform 0.12s;
}

.fb-star:hover,
.fb-star.is-on {
    color: #f59e0b;
    transform: scale(1.08);
}

.fb-star-hint {
    font-size: 12px;
    color: #64748b;
    min-height: 16px;
}

.fb-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.fb-chip {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.fb-chip.is-on {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

.fb-input,
.fb-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #0f172a;
    box-sizing: border-box;
}

.fb-input:focus,
.fb-textarea:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.fb-input.is-invalid,
.fb-textarea.is-invalid {
    border-color: #dc2626;
}

.fb-textarea {
    min-height: 78px;
    resize: vertical;
}

.fb-error {
    display: none;
    color: #b91c1c;
    font-size: 12px;
    margin-top: 4px;
}

.fb-error.is-visible {
    display: block;
}

.fb-msg {
    display: none;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.fb-msg.is-ok {
    display: block;
    background: #dcfce7;
    color: #166534;
}

.fb-msg.is-err {
    display: block;
    background: #fee2e2;
    color: #b91c1c;
}

.fb-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.fb-submit {
    flex: 1;
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    background: #15803d;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.fb-submit:hover { background: #166534; }
.fb-submit:disabled { opacity: 0.65; cursor: wait; }

.fb-later {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 10px;
    padding: 11px 12px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

/* Full feedback page */
.fb-page {
    max-width: 560px;
    margin: 12px auto 28px;
}

.fb-page-card {
    border: 1px solid #d1fae5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    background: #fff;
}

.fb-page-card .fb-modal-head {
    border-radius: 0;
}

.fb-page-card .fb-modal-body {
    padding: 18px 20px 22px;
}

/* Inline form on mock test results */
.fb-inline {
    margin-top: 18px;
    padding: 14px 14px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: left;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    color: #0f172a;
}

#message .fb-inline button {
    margin-top: 0;
}

.fb-inline h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #0f172a;
}

.fb-inline .fb-sub {
    margin: 0 0 8px;
    font-size: 12px;
    color: #64748b;
}

.fb-inline .fb-stars .fb-star {
    font-size: 24px;
}

@media (max-width: 600px) {
    .fb-fab {
        right: 10px;
        bottom: 64px;
        padding: 7px 10px;
        font-size: 11px;
    }

    .fb-fab-close {
        right: 6px;
        bottom: 94px;
    }

    .fb-modal {
        max-width: 100%;
    }
}
