/* ============================================
   OSP Feedback Modal — Shared across all apps
   Screenshot + Kommentar → /api/feedback
   ============================================ */

.fb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.fb-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.fb-modal {
    background: var(--color-card, #fff);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    transform: translateY(20px);
    transition: transform 0.2s;
}

.fb-overlay.active .fb-modal {
    transform: translateY(0);
}

.fb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.fb-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    color: var(--color-text, #1e293b);
}

.fb-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--color-text-muted, #64748b);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-close:hover {
    background: var(--color-bg-light, #f1f5f9);
}

.fb-body {
    padding: 16px 20px;
}

.fb-screenshot {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--color-bg-light, #f1f5f9);
}

.fb-screenshot img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
}

.fb-page-info {
    font-size: 0.75rem;
    color: var(--color-text-muted, #64748b);
    margin-bottom: 12px;
}

.fb-field {
    margin-bottom: 12px;
}

.fb-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted, #64748b);
    margin-bottom: 6px;
}

.fb-btn-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.fb-btn-group.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.fb-btn-option {
    padding: 8px;
    border: 1.5px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: var(--color-text-muted, #64748b);
    transition: all 0.15s;
}

.fb-btn-option:hover {
    border-color: var(--color-primary, #0080C9);
    color: var(--color-primary, #0080C9);
}

.fb-btn-option.active-bug {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
}

.fb-btn-option.active-aenderung {
    background: #eff6ff;
    border-color: #60a5fa;
    color: #1d4ed8;
}

.fb-btn-option.active-frage {
    background: #f5f3ff;
    border-color: #a78bfa;
    color: #6d28d9;
}

.fb-btn-option.active-normal {
    background: var(--color-bg-light, #f1f5f9);
    border-color: #94a3b8;
    color: var(--color-text, #1e293b);
}

.fb-btn-option.active-dringend {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
}

.fb-textarea {
    width: 100%;
    border: 1.5px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    background: var(--color-card, #fff);
    color: var(--color-text, #1e293b);
    outline: none;
    transition: border-color 0.2s;
}

.fb-textarea:focus {
    border-color: var(--color-primary, #0080C9);
    box-shadow: 0 0 0 3px rgba(0,128,201,0.1);
}

.fb-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--color-primary, #0080C9);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fb-submit:hover {
    background: var(--color-primary-dark, #006699);
}

.fb-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fb-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: fb-spin 0.6s linear infinite;
}

@keyframes fb-spin {
    to { transform: rotate(360deg); }
}

/* Flash effect during capture */
.fb-flash {
    position: fixed;
    inset: 0;
    background: white;
    opacity: 0.7;
    z-index: 9999;
    pointer-events: none;
    animation: fb-flash-anim 0.3s ease-out forwards;
}

@keyframes fb-flash-anim {
    0% { opacity: 0.7; }
    100% { opacity: 0; }
}

/* Dark mode */
html.dark .fb-btn-option.active-bug { background: rgba(248,113,113,0.15); }
html.dark .fb-btn-option.active-aenderung { background: rgba(96,165,250,0.15); }
html.dark .fb-btn-option.active-frage { background: rgba(167,139,250,0.15); }
html.dark .fb-btn-option.active-normal { background: rgba(148,163,184,0.15); }
html.dark .fb-btn-option.active-dringend { background: rgba(248,113,113,0.15); }
