/* =====================================================================
   Page Feedback Bubble & Element Picker
   Uses theme CSS variables so it adapts to light/dark mode automatically.
   ===================================================================== */

.feedback-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1060;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary, #6366f1);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feedback-bubble:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.5);
}
.feedback-bubble:active {
    transform: scale(0.96);
}
.feedback-bubble::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.45);
    animation: feedback-pulse 2.5s infinite;
    pointer-events: none;
}
@keyframes feedback-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.45); }
    70%  { box-shadow: 0 0 0 14px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Feedback type buttons — compact 2-line grid (6 buttons, 3 per row) */
.feedback-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.feedback-type-grid .btn {
    font-size: 0.78rem;
    padding: 0.4rem 0.35rem;
    white-space: nowrap;
    min-width: 0;                    /* allow grid items to shrink below label width */
    overflow: hidden;                /* prevent horizontal scroll from overflowing labels */
    text-overflow: ellipsis;
}

/* Clickable stat cards on the feedback triage board */
a.stat-card {
    display: block;
    color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
a.stat-card:hover {
    transform: translateY(-2px);
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}
a.stat-card.stat-card-active {
    border: 1px solid var(--bs-primary, #6366f1) !important;
    box-shadow: 0 0 0 1px var(--bs-primary, #6366f1), 0 4px 16px rgba(99, 102, 241, 0.15) !important;
}

/* Right-side feedback panel (keeps main content visible, no backdrop) */
.modal.feedback-modal .modal-dialog {
    margin: 0 0 0 auto;          /* push to the right edge */
    max-width: 440px;
    height: 100%;
    min-height: 100%;
}
.modal.feedback-modal .modal-dialog .modal-content {
    height: 100%;
    border-radius: 0;
    border-left: 1px solid var(--card-border, #e5e7eb);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
}
.modal.feedback-modal .modal-body {
    overflow-y: auto;
}
@media (max-width: 576px) {
    .modal.feedback-modal .modal-dialog {
        margin: 0;
        max-width: 100%;
    }
}

/* Element picking mode */
body.feedback-picking,
body.feedback-picking * {
    cursor: crosshair !important;
}
.feedback-highlight {
    outline: 3px solid var(--bs-primary, #6366f1) !important;
    outline-offset: 2px;
    background: rgba(99, 102, 241, 0.12) !important;
}

/* Mobile: lift bubble above the locum bottom action bar */
@media (max-width: 768px) {
    .feedback-bubble {
        bottom: 84px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}
