/* =====================================================================
 * RRTS Bug-Report Widget styles
 * Companion to js/components/bug-report-widget.js
 * Brand palette matches css/shared-styles.css (forest greens #1B4332 / #2D6A4F)
 * The widget auto-injects a <link> to this file if it is not already
 * included, so styling works with or without an HTML edit.
 * ===================================================================== */

/* ---- Floating Action Button (FAB) ---- */
.bug-report-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 1035; /* under Bootstrap modal backdrop (1050) */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    padding: 0;
}

.bug-report-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}

.bug-report-fab:active {
    transform: scale(0.96);
}

.bug-report-fab:disabled {
    cursor: progress;
    opacity: 0.8;
}

/* Hidden while the modal is open so it never overlaps / appears in a retake */
.bug-report-fab.is-hidden {
    display: none !important;
}

.bug-report-fab .spinner-border {
    width: 1.4rem;
    height: 1.4rem;
}

@media (max-width: 480px) {
    .bug-report-fab {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
        font-size: 23px;
    }
}

/* ---- Conversation area ---- */
.bugreport-convo {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
    max-height: 42vh;
    overflow-y: auto;
    padding: 8px 4px;
    background: #f7f9f8;
    border: 1px solid #e3e8e6;
    border-radius: 8px;
}

.bugreport-msg {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.bugreport-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bugreport-msg-vera {
    align-self: flex-start;
    background: #fff;
    color: #1f2d28;
    border: 1px solid #d9e2de;
    border-bottom-left-radius: 4px;
}

.bugreport-msg-system {
    align-self: center;
    background: transparent;
    color: #6c757d;
    font-size: 0.82rem;
    font-style: italic;
    max-width: 100%;
    text-align: center;
    padding: 2px 8px;
}

.bugreport-msg-error {
    align-self: center;
    background: #fdecea;
    color: #842029;
    border: 1px solid #f5c2c7;
    max-width: 100%;
    text-align: center;
}

/* typing / status indicator */
.bugreport-typing {
    align-self: flex-start;
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
    padding: 4px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bugreport-typing .spinner-border {
    width: 0.9rem;
    height: 0.9rem;
}

/* ---- Screenshot preview ---- */
.bugreport-shot {
    margin-top: 12px;
    border: 1px solid #e3e8e6;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

.bugreport-shot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.bugreport-shot-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2D6A4F;
    margin: 0;
}

.bugreport-shot-thumb {
    max-width: 100%;
    max-height: 160px;
    border-radius: 6px;
    border: 1px solid #e3e8e6;
    display: block;
    object-fit: contain;
}

.bugreport-shot-empty {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ---- Privacy note ---- */
.bugreport-privacy {
    font-size: 0.78rem;
    color: #6c757d;
    background: #f1f5f3;
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 10px;
}

/* ---- Banners (queue / offline) ---- */
.bugreport-banner {
    font-size: 0.84rem;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bugreport-banner-info {
    background: #e7f1ed;
    color: #1B4332;
    border: 1px solid #c9ded6;
}

.bugreport-banner-warn {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
}

/* ---- Filed (success) terminal state ---- */
.bugreport-filed {
    text-align: center;
    padding: 16px 12px;
}

.bugreport-filed .bi {
    font-size: 2.4rem;
    color: #2D6A4F;
}

.bugreport-filed-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #f1f5f3;
    border-radius: 6px;
    padding: 2px 8px;
    color: #1B4332;
}

/* ---- Footer input ---- */
.bugreport-input-row {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: flex-end;
}

.bugreport-input-row textarea {
    resize: none;
    min-height: 42px;
    max-height: 120px;
}
