/* Bug Report — Modal, drawing toolbar, form styles */

/* --- Bug Report Button (header) --- */
.bug-report-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--border-radius-sm);
    transition: color 0.15s, background 0.15s;
}
.bug-report-btn:hover {
    color: var(--text-primary);
    background: var(--bg-muted);
}
.bug-report-btn:active {
    background: var(--bg-subtle);
}

/* --- Modal Overlay --- */
.bug-report-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* --- Modal Card --- */
.bug-report-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-lg);
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.bug-report-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.bug-report-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.bug-report-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.bug-report-close-btn:hover {
    color: var(--text-primary);
}

.bug-report-modal-body {
    padding: 16px 20px;
    flex: 1;
    overflow-y: auto;
}

/* --- Screenshot Preview --- */
.bug-report-screenshot-wrap {
    position: relative;
    margin-top: 16px;
    margin-bottom: 12px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(151, 71, 255, 0.4);
    box-shadow: 0 0 12px rgba(151, 71, 255, 0.3), 0 0 4px rgba(151, 71, 255, 0.15);
    line-height: 0;
}
.bug-report-screenshot-img {
    width: 100%;
    height: auto;
    display: block;
}
.bug-report-drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* --- Drawing Toolbar --- */
.bug-report-draw-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.bug-report-color-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s;
}
.bug-report-color-btn.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-surface);
}
.bug-report-color-btn--red   { background: #ff4444; }
.bug-report-color-btn--green { background: #44ff44; }

.bug-report-draw-action {
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 12px;
}
.bug-report-draw-action:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.bug-report-stroke-limit {
    font-size: 11px;
    color: var(--accent-caution);
    margin-left: 4px;
}

/* --- No Screenshot --- */
.bug-report-no-screenshot {
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
    margin-bottom: 12px;
}

/* --- Type Toggle (Bug / Feature) --- */
.bug-report-type-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.bug-report-type-toggle .type-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.bug-report-type-toggle .type-btn.active {
    border-color: var(--hue-purple, #9747ff);
    color: var(--text-primary);
    background: rgba(151, 71, 255, 0.1);
}
.bug-report-type-toggle .type-btn:hover:not(.active) {
    border-color: var(--text-muted);
    color: var(--text-secondary);
}
.bug-report-type-toggle .type-btn svg {
    flex-shrink: 0;
}

/* --- Form --- */
.bug-report-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bug-report-form label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: -6px;
}
.bug-report-form label .required {
    color: var(--accent-danger);
}
.bug-report-form input[type="text"],
.bug-report-form textarea {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.bug-report-form input[type="text"]:focus,
.bug-report-form textarea:focus {
    outline: none;
    border-color: var(--accent-main);
}

.bug-report-context {
    margin-top: 4px;
}
.bug-report-context label {
    font-size: 12px;
    color: var(--text-muted);
}
.bug-report-context pre {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    padding: 8px 10px;
    font-size: 11px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* --- Include Screenshot Toggle --- */
.bug-report-include-ss,
label.bug-report-include-ss {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    margin-top: 4px;
}

/* --- Actions Footer --- */
.bug-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-subtle);
}
.bug-report-actions .btn {
    min-width: 100px;
}
.bug-report-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Redaction overlay (injected during screenshot capture) --- */
.bug-report-redact-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--accent-danger, #ef4444);
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius-sm, 4px);
    pointer-events: none;
    z-index: 1;
}
