/* 06-boosts-modal.css - XP-boosts, modals, charts en laadspinner
   Onderdeel van de AperioLibrum-stylesheet. Alle 13 bestanden laden in deze
   volgorde via templates/_stylesheets.html: de volgorde is de cascade, dus niet
   herschikken en geen bestand hernoemen zonder de linktemplate mee te nemen. */
/* ── XP-boosts ── */
.boost-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 12px 0;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--primary);
}

.boost-card .boost-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--text-main);
}

.boost-card .boost-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 0;
    min-width: 0;
}

.boost-card .boost-info strong {
    font-size: 14px;
}

.boost-card .boost-info small {
    font-size: 12px;
    color: var(--text-muted);
}

.boost-manage {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 4px;
}

.boost-manage .boost-label {
    font-size: 13px;
    color: var(--text-muted);
}

.boost-toast {
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 420px;
    padding: 16px 18px 18px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #3ecf8e, #1fa47d);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    animation: boostToastIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), boostToastOut 0.3s ease forwards;
    animation-delay: 0s, 5.5s;
}

.boost-toast::before,
.boost-toast::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.8);
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    animation: boostSparkle 2.2s ease-in-out infinite;
}

.boost-toast::before { top: 9px; right: 38px; }
.boost-toast::after { bottom: 14px; right: 64px; animation-delay: 0.9s; }

.boost-toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    animation: boostPulse 2s ease-in-out infinite;
}

.boost-toast-icon svg {
    width: 24px;
    height: 24px;
}

.boost-toast-body {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.boost-toast-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.boost-toast-sub {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.95;
}

.boost-toast-sub em {
    font-style: normal;
    font-weight: 800;
}

.boost-toast-close {
    flex-shrink: 0;
    align-self: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 6px;
}

.boost-toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.boost-toast-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.75);
    animation: boostToastBar 5.2s linear forwards;
}

@keyframes boostToastIn {
    from { opacity: 0; transform: translateY(-14px) scale(0.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes boostToastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

@keyframes boostToastBar {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes boostPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes boostSparkle {
    0%, 100% { opacity: 0; transform: scale(0.6) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

/* ── Modal overlay ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.15s ease;
}

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

.member-edit-panel {
    background: var(--modal-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 480px;
    margin: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.member-edit-panel h3 {
    margin: 0 0 4px;
    color: var(--text-main);
    font-size: 18px;
}

.member-edit-panel label {
    font-weight: 600;
    font-size: 14px;
    color: var(--label-text);
}

.member-edit-panel input,
.member-edit-panel select {
    width: 100%;
}

/* Wrapper in de boek-modal: zonder display:grid valt de panel-gap tussen
   label en input weg, want gap geldt alleen voor directe grid-kinderen. */
#newBookCodeWrap {
    display: grid;
    gap: 12px;
}

/* ── Charts ── */
.chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 28px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-label {
    width: 160px;
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 20px;
    background: var(--bar-track);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 6px;
    min-width: 2px;
    transition: width 0.4s ease;
}

.bar-count {
    width: 36px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

/* ── Loading spinner ── */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    display: none;
    opacity: 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--line);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

