/* ==========================================================================
   BASIS & CANVAS MODE (Lock Scroll)
   ========================================================================== */

html, body.vbm-scoreboard-body {
    margin: 0 !important;
    padding: 0 !important;
    background-color: #ffffff !important;
    height: 100vh !important;
    width: 100vw !important;
    overflow: hidden !important;
    font-family: Arial, sans-serif !important;
    position: fixed !important;
}


.vbm-canvas-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center; 
    justify-content: center;
    background-color: #ffffff;
    overflow: hidden;
    touch-action: none;
}


.vbm-wrapper { 
    max-width: 1290px; 
    width: 100%;
    margin: 0 auto; 
    position: relative;
    padding: 0 15px;
    box-sizing: border-box;
    text-align: center;
}


/* ==========================================================================
   NAVIGATIE BALK (Boven het bord)
   ========================================================================== */

.vbm-canvas-nav {
    position: absolute;
    top: -75px;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}


.vbm-nav-back {
    background: #f1f3f4;
    border: 1px solid #dcdcdc;
    padding: 8px 18px;
    border-radius: 20px;
    color: #0a0a38;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}


.vbm-nav-faq-btn {
    background: #f1f3f4;
    border: 1px solid #dcdcdc;
    padding: 8px 25px;
    border-radius: 20px;
    color: #0a0a38;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}


.vbm-exit-outer { 
    position: relative; 
}


.vbm-exit-btn {
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: 48px; 
    height: 48px; 
    background-color: #f1f3f4;
    border: 1px solid #dcdcdc; 
    border-radius: 50%; 
    color: #0a0a38;
    text-decoration: none; 
    font-size: 34px; 
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}


.vbm-exit-btn:hover { 
    background-color: #e8e8e8; 
    color: #000; 
    transform: scale(1.08); 
}


/* ==========================================================================
   SCOREBORD WRAPPER & PANELS (Desktop)
   ========================================================================== */

.vbm-scoreboard-wrapper {
    background-color: #f1f3f4;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #dcdcdc;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 1290px;
    max-width: 95vw;
    box-sizing: border-box;
}


.vbm-main-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 30px;
}


.vbm-team-panel {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    width: 30%;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}


.vbm-team-panel h2 {
    font-size: 16px;
    color: #888;
    margin-bottom: 15px;
}


.vbm-score-value {
    font-size: 120px;
    font-weight: bold;
    color: #0a0a38;
    margin: 10px 0;
}


.vbm-score-btn-large {
    width: 100%;
    height: 50px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 24px;
    cursor: pointer;
}


.vbm-center-panel {
    width: 30%;
    text-align: center;
    padding-top: 50px;
}


#timer-display {
    font-size: clamp(48px, 14vw, 115px);
    font-weight: bold;
    color: #0a0a38;
    font-family: monospace;
}


/* Verberg mobiele scores op desktop */
.vbm-mobile-scores {
    display: none;
}


/* ==========================================================================
   CONTROLS & BOTTOM SECTION
   ========================================================================== */

.vbm-bottom-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
}


.vbm-controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


.vbm-controls-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}


.vbm-action-btn {
    padding: 18px 45px;
    font-weight: bold;
    font-size: 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}


.vbm-action-btn:hover {
    border: 1px solid #0a0a38;
}


.green { background: #0a0a38; color: white; }
.yellow { background: #f2b01e; color: white; }
.white { background: white; border: 1px solid #ddd; }


.vbm-divider { border: 0; border-top: 1px solid #eee; margin: 20px 0; }


.vbm-cards-row {
    display: flex;
    justify-content: space-between;
}


.vbm-team-cards {
    display: flex;
    gap: 20px; 
}


.vbm-card-control {
    display: flex;
    align-items: center;
    gap: 10px;
}


.vbm-mini-input {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}


.vbm-mini-input button {
    padding: 5px 12px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
}


.vbm-mini-input span {
    padding: 5px 15px;
    font-weight: bold;
}


/* ==========================================================================
   EXTRA TIJD (Blessuretijd Invoer)
   ========================================================================== */

.vbm-extra-time-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}


.vbm-extra-time-inputs {
    display: flex;
    gap: 20px;
}


.vbm-extra-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}


.vbm-extra-group label {
    font-size: 12px;
    font-weight: bold;
    color: #0a0a38;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.vbm-extra-group input {
    width: 80px;
    height: 50px;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #0a0a38;
    outline: none;
}


/* ==========================================================================
   POP-UP / MODAL STYLING (Reset & FAQ)
   ========================================================================== */

#vbm-modal-overlay, #vbm-faq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}


.vbm-modal-hidden {
    visibility: hidden;
    opacity: 0 !important;
    display: none !important;
}


.vbm-modal-content {
    background: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 18px;
    padding: 45px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    text-align: left;
    max-height: 80vh;
    overflow-y: auto;
}


.vbm-modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 32px;
    cursor: pointer;
    color: #0a0a38;
    line-height: 1;
    background: none;
    border: none;
}


.vbm-modal-title {
    margin-top: 0;
    font-size: 26px;
    border-bottom: 2px solid #f1f3f2;
    padding-bottom: 15px;
    color: #0a0a38;
    font-weight: 800;
}


.vbm-modal-text {
    font-size: 16px;
    color: #444;
    margin: 20px 0 30px;
    line-height: 1.5;
}


.vbm-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}


.vbm-modal-btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}


.vbm-modal-btn.primary {
    background: white;
    color: #0a0a38;
    border: 1px solid #ddd;
}


.vbm-modal-btn.primary:hover {
    background: #f8f9fa;
    border: 1px solid #0a0a38;
}


.vbm-modal-btn.secondary {
    background: white;
    color: #0a0a38;
    border: 1px solid #ddd;
}


.vbm-modal-btn.secondary:hover {
	background: #f8f9fa;
    border: 1px solid #0a0a38;
}


/* ==========================================================================
   FAQ & ACCORDION (Shared)
   ========================================================================== */

.vbm-faq-item { border-bottom: 1px solid #eee; text-align: left; }


.vbm-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: 500;
    color: #0a0a38;
    font-size: 17px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}


.vbm-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}


.vbm-faq-answer p { padding-bottom: 15px; margin: 0; }


.vbm-faq-item.active .vbm-faq-answer {
    max-height: 500px;
    padding-bottom: 25px;
}


.vbm-faq-icon {
    width: 32px; height: 32px; display: flex; align-items: center; 
    justify-content: center; border: 1px solid #e0e0e0; border-radius: 4px; 
    font-size: 22px; flex-shrink: 0;
}


.vbm-faq-icon::before { content: '+'; }
.vbm-faq-item.active .vbm-faq-icon::before { content: '-'; }


/* ==========================================================================
   MOBIEL OPTIMALISATIE (Start, Tweede helft, Reset gefixed)
   ========================================================================== */

@media (max-width: 768px) {
    html, body.vbm-scoreboard-body {
        height: 100dvh !important;
    }


    .vbm-canvas-mode {
        align-items: flex-start;
        padding-top: 85px;
    }


    .vbm-canvas-nav {
        top: -65px;
        padding: 0 10px;
        box-sizing: border-box;
    }


    .vbm-nav-back, .vbm-nav-faq-btn {
        padding: 6px 12px;
        font-size: 12px;
    }


    .vbm-exit-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }


    .vbm-scoreboard-wrapper {
        padding: 15px;
        max-height: 98dvh;
        justify-content: space-between;
    }


    .vbm-desktop-only {
        display: none !important;
    }


    .vbm-main-container {
        margin-bottom: 10px;
        justify-content: center;
    }


    .vbm-center-panel {
        width: 100%;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }


    #timer-display {
        font-size: 50px;
    }
    
    .vbm-controls-container {
    	gap: 10px;
    }


    .vbm-mobile-scores {
        display: flex;
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }


    .vbm-mobile-team {
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 5px;
        flex: 1;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }


    .vbm-mobile-label {
        font-size: 12px;
        color: #888;
        text-transform: uppercase;
        margin-bottom: 5px;
    }


    .vbm-mobile-score-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }


    .vbm-score-value-mob {
        font-size: clamp(40px, 8vh, 50px);
        font-weight: bold;
        color: #0a0a38;
        line-height: 1;
    }


    .vbm-score-btn-mob {
        width: 40px;
        height: 40px;
        background: #f8f9fa;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 20px;
    }


    .vbm-bottom-section {
        padding: 10px;
    }

    /* Knoppen Start, Tweede helft, Reset gelijkmatig verdelen over breedte */
    .vbm-controls-row {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 8px; /* Ruimte tussen knoppen */
    }


    .vbm-action-btn {
        flex: 1; /* Zorgt dat elke knop even groot is */
        padding: 15px 5px; /* Grotere padding voor hoogte */
        font-size: 11px; /* Iets kleiner font zodat 'Tweede helft' past */
        min-width: 0;
        border-radius: 8px;
        text-align: center;
        white-space: normal; /* Toestaan dat tekst afbreekt indien nodig */
        line-height: 1.2;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 50px; /* Vaste hoogte voor uniformiteit */
    }


    .vbm-extra-time-inputs {
        gap: 10px;
    }


    .vbm-extra-group label {
        font-size: 10px;
    }


    .vbm-extra-group input {
        width: 80px;
        height: 35px;
        font-size: 18px;
    }


    .vbm-cards-row {
        padding: 0;
        justify-content: space-around;
    }


    .vbm-team-cards {
        display: flex;
        flex-direction: column; /* Geel boven, Rood onder */
        gap: 10px;
    }


    .vbm-divider { margin: 5px 0; }


    .vbm-mini-input button { padding: 5px 6px; }


    .vbm-mini-input span { padding: 5px 8px; font-size: 12px; }


    .vbm-card-label { font-size: 10px; min-width: 35px; }


    .vbm-modal-content {
        padding: 25px;
        margin: 10px;
    }
}