/* MXCIS Feedback Widget -- slide-out (globaal) + compact (inline). */

.mxcis-feedback {
    --fb-bg: #ffffff;
    --fb-border: #e5e7eb;
    --fb-text: #111827;
    --fb-muted: #6b7280;
    --fb-primary: #2563eb;
    --fb-primary-hover: #1d4ed8;
    --fb-up: #16a34a;
    --fb-down: #dc2626;
    --fb-shadow: 0 8px 24px rgba(0,0,0,0.08);
    color: var(--fb-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
}

/* ---------- Global: FAB rechts-onder ----------
   Job feedback #4 (31-aug 2026): "die feedback knop zit toch niet mooi
   aan de rechterkant" -- de vroegere slide-out-tab tegen de middenrand
   overlapte met content-kaarten (Quality Gate op /management-dashboard).
   Pattern nu: kleine ronde FAB in de rechteronderhoek, paneel klapt op
   naar links-boven vanuit die knop. Gangbaar UX-pattern (Intercom, etc.).
*/

.mxcis-feedback-global {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

.mxcis-feedback-global .mxcis-fb-tab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--fb-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.mxcis-feedback-global .mxcis-fb-tab:hover {
    background: var(--fb-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.mxcis-feedback-global .mxcis-fb-tab .bi {
    font-size: 20px;
    line-height: 1;
}

/* Label naast de FAB verbergen -- de icon spreekt voor zich */
.mxcis-feedback-global .mxcis-fb-tab-label {
    display: none;
}

.mxcis-feedback-global .mxcis-fb-panel {
    position: absolute;
    bottom: 60px; /* boven de FAB uit */
    right: 0;
    background: var(--fb-bg);
    border: 1px solid var(--fb-border);
    border-radius: 12px;
    box-shadow: var(--fb-shadow);
    padding: 14px 16px;
    width: 320px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;

    /* Verborgen tot .is-open */
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
    transform-origin: bottom right;
}

.mxcis-feedback-global.is-open .mxcis-fb-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Compact (inline) ---------- */

.mxcis-feedback-compact {
    display: inline-block;
    margin: 8px 0;
}

.mxcis-feedback-compact .mxcis-fb-panel {
    background: var(--fb-bg);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    padding: 12px 14px;
    min-width: 280px;
    max-width: 380px;
}

/* ---------- Gedeelde onderdelen ---------- */

.mxcis-fb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.mxcis-fb-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--fb-text);
}

.mxcis-fb-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.mxcis-fb-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--fb-border);
    background: #fafafa;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.1s ease, background 0.1s ease, color 0.1s ease;
}

.mxcis-fb-btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.mxcis-fb-btn-up:hover  { color: var(--fb-up); }
.mxcis-fb-btn-down:hover { color: var(--fb-down); }

.mxcis-fb-hint {
    font-size: 11px;
    color: var(--fb-muted);
    line-height: 1.35;
    margin-top: 4px;
}

/* ---------- Comment paneel ---------- */

.mxcis-fb-comment {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--fb-border);
}

.mxcis-fb-textarea {
    width: 100%;
    border: 1px solid var(--fb-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    color: var(--fb-text);
}

.mxcis-fb-textarea:focus {
    outline: none;
    border-color: var(--fb-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.mxcis-fb-screenshot-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.mxcis-fb-attach {
    background: #f3f4f6;
    border: 1px solid var(--fb-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    color: var(--fb-text);
}

.mxcis-fb-attach:hover { background: #e5e7eb; }

.mxcis-fb-hint-inline {
    font-size: 11px;
    color: var(--fb-muted);
}

.mxcis-fb-preview {
    position: relative;
    margin-top: 8px;
    border: 1px solid var(--fb-border);
    border-radius: 6px;
    padding: 4px;
    display: inline-block;
    max-width: 100%;
}

.mxcis-fb-preview-img {
    max-width: 100%;
    max-height: 160px;
    display: block;
    border-radius: 4px;
}

.mxcis-fb-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--fb-border);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--fb-text);
}

.mxcis-fb-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.mxcis-fb-cancel {
    background: transparent;
    border: 1px solid var(--fb-border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    color: var(--fb-text);
}

.mxcis-fb-submit {
    background: var(--fb-primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.mxcis-fb-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.mxcis-fb-submit:not(:disabled):hover {
    background: var(--fb-primary-hover);
}

/* ---------- Toast ---------- */

.mxcis-fb-toast {
    margin-top: 10px;
    padding: 8px 10px;
    background: #ecfdf5;
    color: #065f46;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}
