/* ======================== */
/* Bug Report FAB & Modal   */
/* ======================== */

.bug-report-fab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, filter 0.2s ease;
    filter: drop-shadow(0 0 3px rgba(253, 216, 53, 0.4));
}

/* Custom tooltip — no delay */
.bug-report-fab::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-elevated, #1f2937);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 1000;
}

.bug-report-fab:hover::after {
    opacity: 1;
}

.bug-report-fab:hover {
    background: rgba(253, 216, 53, 0.1);
    filter: drop-shadow(0 0 6px rgba(253, 216, 53, 0.6));
}

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

/* Overlay — NO backdrop-filter blur */
.br-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.br-overlay.hidden {
    display: none;
}

/* Modal — portrait layout, sized by JS based on screenshot aspect ratio */
.br-modal {
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    max-width: 95vw;
    max-height: 94vh;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: brSlideUp 0.2s ease;
    display: flex;
    flex-direction: column;
}

@keyframes brSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toolbar — compact top bar with title + close */
.br-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.br-toolbar-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    padding-left: 4px;
}

.br-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.br-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text);
}

/* Canvas area — takes all remaining vertical space */
.br-canvas-area {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    background: #1a1a2e;
}

.br-canvas-area canvas {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

/* Bottom bar — inline comment + send button */
.br-bottom {
    flex-shrink: 0;
    padding: 10px 14px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}

.br-feedback {
    font-size: 13px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 6px;
}

.br-feedback.hidden {
    display: none;
}

.br-feedback.success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.br-feedback.error {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.br-hint {
    font-size: 12px;
    color: var(--color-text-faint);
    margin: 0 0 6px 2px;
}

.br-send-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.br-comment {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
    border: 2px solid var(--color-primary);
    border-radius: 20px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--color-text);
    background: var(--color-bg);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 79, 70, 229), 0.1);
}

.br-comment:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb, 79, 70, 229), 0.2);
}

.br-comment::placeholder {
    color: var(--color-text-secondary, #888);
    font-weight: 500;
}

.br-send {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: none;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: var(--shadow-primary);
    padding: 0;
}

.br-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.br-send:active {
    transform: scale(0.95);
}

.br-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.br-canvas-area.loading::after {
    content: 'Capturing screenshot...';
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* ======================== */
/* My Feedback Panel        */
/* ======================== */

.br-fh-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 16px;
}

.br-fh-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.br-fh-loading,
.br-fh-empty {
    font-size: 14px;
    color: var(--color-text-faint);
    text-align: center;
    padding: 32px 0;
}

.br-fh-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    transition: background 0.15s ease;
}

.br-fh-item:hover {
    background: var(--color-bg-subtle, rgba(0,0,0,0.02));
}

.br-fh-status {
    flex-shrink: 0;
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.br-fh-status--open {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.br-fh-status--resolved {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.br-fh-body {
    flex: 1;
    min-width: 0;
}

.br-fh-title {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.4;
    margin: 0 0 4px;
    word-break: break-word;
}

.br-fh-date {
    font-size: 12px;
    color: var(--color-text-faint);
}

/* Badge on "My Feedback" menu item */
.br-feedback-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
}

.br-feedback-badge.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .br-modal {
        max-width: 98vw;
        max-height: 96vh;
        border-radius: var(--radius-lg);
    }
}

