/* ==========================================================================
   WMS TIMERS - GLOBAL & DASHBOARD
   ========================================================================== */

.wmstimers-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 0 60px;
}

@media (min-width: 768px) {
    .wmstimers-container { grid-template-columns: repeat(3, 1fr); }
}

.wmstimers-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 25px;
    text-align: center;
    text-decoration: none;
    color: #333333;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #f0f0f0;
}

.wmstimers-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.wmstimers-icon-wrapper {
    width: 70px; height: 70px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 25px; transition: transform 0.3s ease;
}

.wmstimers-card:hover .wmstimers-icon-wrapper { transform: scale(1.1); }
.wmstimers-icon-wrapper svg { width: 32px; height: 32px; }

.wmstimers-card.stopwatch .wmstimers-icon-wrapper { background-color: #e8f2ff; color: #0a0a38; }
.wmstimers-card.afteltimer .wmstimers-icon-wrapper { background-color: #e8f2ff; color: #0a0a38; }
.wmstimers-card.rondetimer .wmstimers-icon-wrapper { background-color: #e8f2ff; color: #0a0a38; }

.wmstimers-title { font-size: 1.4rem; font-weight: 700; margin: 0 0 12px 0; color: #1a1a1a; }
.wmstimers-description { font-size: 1rem; color: #666666; line-height: 1.5; margin: 0; }

/* ==========================================================================
   CANVAS MODE & TOOL WRAPPERS (Lock Scroll)
   ========================================================================== */

.template-stopwatch body, 
.template-afteltimer body, 
.template-rondetimer body { 
    overflow: hidden !important; 
    width: 100vw !important; 
    height: 100vh !important; 
    position: fixed !important;
    margin: 0 !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; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; 
    text-align: center; 
    position: relative;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Navigatie balk boven de tool */
.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; 
    top: 0; 
    right: 0; 
}

.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); }

/* Tool Box Styles */
.vbm-drill-box { 
    position: relative; 
    background-color: #f1f3f4; 
    border: 1px solid #dcdcdc; 
    border-radius: 12px; 
    padding: 60px 20px; 
    width: 100%; 
    box-sizing: border-box; 
    transition: all 0.3s ease;
}

.vbm-box-running { background-color: #e6edeb; border-color: #2e5a46; }
.vbm-box-paused { background-color: #fdf6e7; border-color: #f1b522; }

.vbm-box-top { position: absolute; top: 20px; left: 30px; right: 30px; display: flex; justify-content: space-between; align-items: center; }
.vbm-drill-label { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: #0a0a38; }
.vbm-drill-type { font-size: 14px; font-weight: 600; color: #0a0a38; letter-spacing: 0.5px; text-transform: uppercase; }

.vbm-time-display { 
    font-size: clamp(48px, 14vw, 115px); 
    font-weight: 700; 
    margin: 10px 0 25px; 
    color: #0a0a38; 
    font-variant-numeric: tabular-nums; 
    line-height: 1; 
}

.vbm-drill-label svg, .vbm-nav-btn svg {
    margin-right: 8px;
    vertical-align: middle;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.vbm-btn-row { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.vbm-btn { 
    display: flex; align-items: center; justify-content: center; 
    gap: 12px; padding: 18px 45px; border-radius: 12px; 
    font-size: 20px; font-weight: 700; cursor: pointer; 
    border: 1px solid transparent; transition: transform 0.1s, background 0.2s; 
    min-width: 170px; 
}
.vbm-btn-green { background-color: #0a0a38; color: #fff; }
.vbm-btn-green:hover { background-color: #ffc825; }
.vbm-btn-white { background-color: #ffffff; color: #0a0a38; border: 1px solid #dcdcdc; }
.vbm-btn-white:hover { background-color: #f9f9f9; }
.vbm-btn-reset-yellow { background-color: #f1b522; color: #1a1a1a; border: 1px solid #d8a11b; }
.vbm-btn-pause-active { background-color: #ffffff; color: #0a0a38; border: 1px solid #dcdcdc; }

.vbm-nav-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #fff; border: 1px solid #dcdcdc; padding: 8px 18px;
    border-radius: 15px; cursor: pointer; font-size: 13.5px; 
    font-weight: 600; color: #0a0a38; transition: background 0.2s, border-color 0.2s;
    white-space: nowrap; margin-top: 15px;
}

/* ==========================================================================
   MODALS (History & FAQ)
   ========================================================================== */

.vbm-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.55); display: none; justify-content: center; 
    align-items: center; z-index: 9999; padding: 20px; pointer-events: auto;
}
.vbm-modal-content {
    background: #fff; width: 100%; max-width: 720px; border-radius: 18px; 
    padding: 45px; position: relative; box-shadow: 0 15px 40px rgba(0,0,0,0.25); 
    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; z-index: 10;
}

/* Algemene Titel Styling voor Modals */
.vbm-modal-title {
    margin-top: 0; 
    font-size: 26px; 
    border-bottom: 2px solid #f1f3f2; 
    padding-bottom: 15px; 
    text-align: left;
    color: #0a0a38;
}

.vbm-modal-history-item { display: flex; align-items: center; padding: 16px 0; border-bottom: 1px solid #eee; }
.vbm-hist-col-poging { width: 100px; text-align: left; font-weight: 500; color: #666; font-size: 15px; }
.vbm-hist-col-input { flex-grow: 1; padding: 0 20px; border-left: 1px solid #ddd; border-right: 1px solid #ddd; display: flex; }
.vbm-hist-col-tijd { width: 120px; text-align: right; font-weight: 700; color: #1a1a1a; font-size: 17px; }
.vbm-note-input { border: none; background: transparent; width: 100%; font-size: 16px; outline: none; color: #0a0a38; }

/* UPDATE: Geschiedenis footer knoppen onder elkaar */
.vbm-history-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column; /* Zet ze onder elkaar */
    gap: 12px;              /* Ruimte tussen de knoppen */
    width: 100%;
}

.vbm-history-footer .vbm-nav-btn {
    font-size: 16px;
    padding: 15px;
    width: 100%;           /* Volledige breedte */
    margin-top: 0;         /* Reset margin van globale vbm-nav-btn */
    padding: 12px;         /* Iets hogere knop voor gebruiksvriendelijkheid */
    justify-content: center;
}

.vbm-faq-container-inline { margin-top: 20px; display: flex; justify-content: center; }

/* ==========================================================================
   AFTELTIMER SPECIFIEK
   ========================================================================== */

.vbm-progress-container { width: 85%; height: 8px; background: #dcdcdc; border-radius: 10px; margin: 0 auto 30px auto; overflow: hidden; }
.vbm-progress-bar { width: 0%; height: 100%; background: #0a0a38; transition: width 0.1s linear; }
.vbm-setup-section { margin-top: 10px; padding-top: 20px; border-top: 1px solid #dcdcdc; }
.vbm-input-row { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; }
.vbm-input-group label { display: block; font-size: 12px; color: #666; font-weight: 600; text-transform: uppercase; margin-bottom: 5px; }
.vbm-input-group input { 
    width: 80px; padding: 10px 5px; border: 1px solid #dcdcdc; border-radius: 6px; 
    text-align: center; font-size: 16px; font-weight: 700; background: #fff; height: auto; color: #0a0a38;
}
.vbm-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 600px; margin: 0 auto; }
.vbm-preset-btn { 
    background: #fff; border: 1px solid #dcdcdc; color: #0a0a38; padding: 10px 5px; border-radius: 6px; 
    cursor: pointer; font-weight: 600; font-size: 14px; transition: all 0.2s; 
}
.vbm-preset-btn:hover { border-color: #0a0a38; color: #0a0a38; background: #f9f9f9; }
.vbm-hidden { display: none !important; }

/* ==========================================================================
   RONDETIMER BUILDER SPECIFIEK
   ========================================================================== */

.vbm-scrollable-card {
    max-height: 80vh;
    overflow-y: auto;
    padding-top: 20px;
    scrollbar-width: thin;
}

.vbm-scrollable-card::-webkit-scrollbar { width: 6px; }
.vbm-scrollable-card::-webkit-scrollbar-thumb { background: #dcdcdc; border-radius: 10px; }

.vbm-timer-card { background-color: #f1f3f2; border: 1px solid #dcdcdc; border-radius: 12px; padding: 40px; text-align: center; }
.vbm-status-subtext { font-size: 16px; font-weight: 700; color: #888; text-transform: uppercase; margin-bottom: 30px; }
.vbm-status-work { color: #0a0a38; font-weight: 800; }
.vbm-status-rest { color: #f1b522; font-weight: 800; }

.vbm-builder { margin-top: 20px; text-align: left; border-top: 1px solid #dcdcdc; padding-top: 30px; }
.vbm-builder-list { list-style: none; padding: 0; margin: 0; }
.vbm-step { 
    display: flex; align-items: center; gap: 15px; background: #fff; border: 1px solid #ddd; 
    border-radius: 8px; padding: 15px 20px; margin-bottom: 10px; position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vbm-step.is-draggable { cursor: grab; }
.vbm-step.dragging { 
    opacity: 0.5; transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border: 2px solid #2e5a46; background: #fafafa;
}

.vbm-drag-icon { color: #aaa; flex-shrink: 0; display: none; margin-right: 10px; }
.vbm-step.is-draggable .vbm-drag-icon { display: block; }

.vbm-step-label { font-weight: 700; width: 100px; font-size: 15px; color: #0a0a38; }
.vbm-step-inputs input { width: 65px; padding: 8px; border: 1px solid #ccc; border-radius: 5px; text-align: center; }
.vbm-step-work { border-left: 6px solid #0a0a38; }
.vbm-step-rest { border-left: 6px solid #f1b522; }
.vbm-remove-step { margin-left: auto; cursor: pointer; color: #ccc; font-size: 28px; padding: 0 5px; transition: color 0.2s; }
.vbm-remove-step:hover { color: #f44336; }

.vbm-btn-add { padding: 10px 20px; border-radius: 6px; border: 1px dashed #0a0a38; background: #fff; color: #0a0a38; font-weight: 700; cursor: pointer; }
.vbm-btn-skip { background-color: #f1b522; color: #fff; display: none; }

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

.vbm-faq-container, .vbm-faq { margin-top: 40px; text-align: left; border-top: 1px solid #eee; padding-top: 40px; }

/* Enkel de titels centreren */
.vbm-faq h2, .vbm-faq-title-h3 { 
    font-size: 24px; color: #1a1a1a; margin-bottom: 25px; 
    text-align: center; font-weight: 700; 
}

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

/* Forceer links uitlijnen voor de vraag-buttons */
.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; }

/* De + en - icoon styling */
.vbm-faq-icon, .vbm-faq-toggle-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1px solid #e0e0e0; font-size: 22px; flex-shrink: 0; }

/* Default state: Plus */
.vbm-faq-icon::before, .vbm-faq-toggle-icon::before { content: '+'; }

/* Active state: Min */
.vbm-faq-item.active .vbm-faq-icon::before, 
.vbm-faq-item.active .vbm-faq-toggle-icon::before { content: '-'; }

/* ==========================================================================
   MOBILE RESPONSIVENESS (iPhone SE & Kleine schermen)
   ========================================================================== */

@media screen and (max-width: 600px) {
    .vbm-canvas-mode { align-items: flex-start; padding-top: 85px; } 
    .vbm-canvas-nav { top: -65px; padding: 0 10px; }
    .vbm-nav-back { padding: 6px 12px; font-size: 12px; }
    .vbm-nav-faq-btn { padding: 6px 15px; font-size: 12px; }
    .vbm-exit-btn { width: 40px; height: 40px; font-size: 24px; }
    
    .vbm-box-top { left: 15px; right: 15px; top: 12px; }
    .vbm-drill-box { padding: 45px 12px 15px; }
    .vbm-timer-card { padding: 30px 15px; }
    .vbm-scrollable-card { max-height: 75vh; }
    .vbm-time-display { margin: 0 0 10px 0; font-size: clamp(30px, 16vw, 50px); }
    .vbm-input-row, .vbm-progress-container { margin-bottom: 5px; }
	.vbm-setup-section { margin-top: 10px; padding-top: 10px; }
    .vbm-btn { padding: 14px 10px; min-width: 130px; font-size: 17px; gap: 8px; }
    .vbm-presets { grid-template-columns: repeat(2, 1fr); gap: 5px; }
    .vbm-input-group input { width: 65px; font-size: 15px; padding: 6px 5px; }
    .vbm-modal-content { padding: 30px 15px; }
    .vbm-hist-col-poging { width: 70px; font-size: 13px; }
    .vbm-hist-col-tijd { width: 90px; font-size: 15px; }

    /* Mobiele Layout voor Rondes: Label boven, inputs naast elkaar eronder */
    .vbm-step {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 15px;
    }

    .vbm-drag-icon {
        position: absolute;
        left: 10px;
        top: 15px;
    }

    .vbm-step-label {
        width: auto;
        text-align: center;
        margin-bottom: 5px;
        font-size: 16px;
    }

    .vbm-step-inputs {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .vbm-remove-step {
        position: absolute;
        right: 10px;
        top: 10px;
    }
}