/* config.css */

/* Basis layout voor de hele pagina */
body {
    background-color: #f0f2f5;
    margin: 0;
    font-family: 'Stack Sans Text', sans-serif !important;
    overflow: hidden;
}

.config-page-wrapper {
    display: flex;
    height: 100vh;
}

/* --- Linker Sidebar --- */
.config-sidebar {
    width: 50vw;
    background-color: #ffffff;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    /* Flexbox toevoegen om knop en titel naast elkaar te zetten */
    display: flex;
    align-items: center;
    gap: 16px; 
}

.sidebar-header h2 {
    margin: 0;
    /* Margin-top verwijderd zodat hij verticaal centreert met de knop */
    font-size: 1.5rem;
}
/* Nieuwe stijl voor de terug-knop (gebaseerd op jouw input) */
.button-modern-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Width auto gemaakt en padding toegevoegd zodat tekst 'Terug' past */
    width: auto; 
    padding: 0 16px; 
    height: 42px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 8px; /* Ruimte tussen icoon en tekst */
}

/* Hover effect */
.button-modern-icon:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Active / Klik effect */
.button-modern-icon:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    background-color: #f1f5f9;
}

.button-primary { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: #4b5563; }


/* Tabs */
.config-tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
}
.tab-button {
    flex-grow: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Stack Sans Text', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    
    /* Nieuwe regels voor icoon uitlijning */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Ruimte tussen icoon en tekst */
}
.tab-button:hover {
    background-color: #f9fafb;
}
.tab-button.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Content in de sidebar */
.sidebar-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.sidebar-content .form-group {
    margin-bottom: 2rem;
}
.sidebar-content .form-group:last-child {
    margin-bottom: 0; /* Minder marge voor het laatste element in een accordion */
}

.sidebar-content .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
}
.sidebar-content .form-group input[type="text"],
.sidebar-content .form-group textarea,
.sidebar-content .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: 'Stack Sans Text', sans-serif;
    box-sizing: border-box; /* Zorgt voor consistente padding */
}
.sidebar-content .form-group input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 40px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    background-color: transparent;
}
.sidebar-content .form-group input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.sidebar-content .form-group input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; }

.sidebar-content .form-group input[type="range"] { width: 100%; }
.radio-group { display: flex; gap: 1rem; }
.placeholder-text {
    font-size: 0.9rem;
    color: #4b5563;
    background-color: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    line-height: 1.6;
}
.separator {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}
.form-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 4px;
    display: block;
}

/* --- NIEUWE THEMA CARDS STYLING --- */

.panel-intro {
    color: #64748b;
    font-size: 0.95rem;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.theme-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 4px;
}

.theme-card {
    position: relative;
    cursor: pointer;
    display: block;
}

/* Verberg de standaard radio input */
.theme-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* De container van de kaart */
.card-content {
    border: 2px solid #e2e8f0; /* Standaard border */
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.card-content:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* --- De Mini UI Preview (Header + Bubbles) --- */
.mini-ui {
    width: 100%;
    height: 90px;
    background-color: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.mini-header {
    height: 24px;
    width: 100%;
    background-color: #cbd5e1; /* Fallback */
}

.mini-body {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-msg {
    height: 8px;
    border-radius: 4px;
    width: 70%;
}

.mini-msg.bot {
    align-self: flex-start;
    background-color: #e2e8f0;
}

.mini-msg.user {
    align-self: flex-end;
    background-color: #cbd5e1; /* Fallback */
}

/* --- Kleurenschema's voor de mini-previews --- */

/* Standaard (Blauw) */
.mini-ui.standard .mini-header { background-color: #2563eb; }
.mini-ui.standard .mini-msg.user { background-color: #2563eb; opacity: 0.8; }

/* Pompoen (Oranje) */
.mini-ui.pumpkin .mini-header { background: linear-gradient(135deg, #fb923c, #ea580c); }
.mini-ui.pumpkin .mini-msg.user { background-color: #ea580c; opacity: 0.8; }

/* Oceaan (Teal) */
.mini-ui.ocean .mini-header { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.mini-ui.ocean .mini-msg.user { background-color: #0891b2; opacity: 0.8; }

/* Zakelijk (Donker) */
.mini-ui.business .mini-header { background: linear-gradient(135deg, #4b5563, #111827); }
.mini-ui.business .mini-msg.user { background-color: #4b5563; opacity: 0.8; }

/* Bos (Groen) */
.mini-ui.forest .mini-header { background: linear-gradient(135deg, #16a34a, #15803d); }
.mini-ui.forest .mini-msg.user { background-color: #15803d; opacity: 0.8; }

/* Bes (Roze) */
.mini-ui.berry .mini-header { background: linear-gradient(135deg, #e11d48, #be123c); }
.mini-ui.berry .mini-msg.user { background-color: #be123c; opacity: 0.8; }

/* Koninklijk (Paars) */
.mini-ui.royal .mini-header { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.mini-ui.royal .mini-msg.user { background-color: #6d28d9; opacity: 0.8; }

/* Custom (Grijs + Icoon) */
.mini-ui.custom { background-color: #f1f5f9; border: 1px dashed #94a3b8; }
.mini-ui.custom .mini-header { background-color: #cbd5e1; }
.mini-ui.custom .edit-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background-color: rgba(255,255,255,0.4);
    font-size: 1.2rem;
}

/* --- Tekst Label --- */
.theme-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
}

/* --- Checkmark Badge (Vinkje) --- */
.check-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background-color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* --- ACTIVE STATE (Geselecteerd) --- */
.theme-card input:checked + .card-content {
    border-color: #2563eb;
    background-color: #eff6ff; /* Heel licht blauw */
    box-shadow: 0 0 0 1px #2563eb, 0 4px 12px rgba(37, 99, 235, 0.15);
}

.theme-card input:checked + .card-content .theme-name {
    color: #2563eb;
    font-weight: 600;
}

.theme-card input:checked + .card-content .check-badge {
    opacity: 1;
    transform: scale(1);
}

/* --- NIEUWE FEATURE CARDS STYLING --- */

/* Container voor de lijst */
.feature-checklist {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* De kaart zelf */
.feature-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
    overflow: hidden; /* Zorgt dat content binnen de ronde hoeken blijft */
}

/* Actieve staat (Wanneer switch aan staat) */
.feature-card.active {
    border-color: #2563eb;
    background-color: #f8fafc; /* Heel lichte tint */
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.05);
}

/* Header van de kaart (Titel + Info + Switch) */
.feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}

/* Linker gedeelte met label en info knop */
.feature-label-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-label-group label {
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
    margin: 0;
    cursor: pointer;
}

/* De Info (i) knop */
.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #94a3b8;
    background-color: transparent;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.85rem;
}

.info-btn:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

/* Content Area (voor extra opties zoals inputs) */
.feature-content {
    background-color: #ffffff;
    padding: 0; /* JS regelt display block/none, wij regelen padding in inner wrapper */
}

/* Container binnen de content area voor padding */
.feature-settings-wrapper {
    padding: 20px;
    background-color: #f8fafc; /* Iets donkerder dan wit om onderscheid te maken */
}

/* Locked state override */
.feature-lock-wrapper.locked .feature-card {
    opacity: 0.6;
    background-color: #f3f4f6;
    border-color: #e5e7eb;
}

/* TOEGEVOEGD: Styling voor conditionele opties */
.leadgen-options {
    margin-top: -1px;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background-color: #fdfdfd;
}

/* Custom Switch Stijl */
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 22px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #2563eb;
}
input:focus + .slider {
    box-shadow: 0 0 1px #2563eb;
}
input:checked + .slider:before {
    transform: translateX(16px);
}


/* --- Custom Toggle Switch voor Positie (Vernieuwd Design) --- */
.position-toggle-switch {
    position: relative;
    width: 100%;
    background-color: #f1f5f9; /* Match achtergrondkleur witruimte toggle */
    border-radius: 8px;
    height: 42px; /* Match hoogte witruimte toggle */
    padding: 4px;
    display: flex;
    border: 1px solid #e2e8f0; /* Match border witruimte toggle */
    box-sizing: border-box;
}

.position-toggle-switch input {
    display: none;
}

/* Label fungeert als container voor de tekst en de glider */
.position-toggle-switch label {
    position: relative;
    width: 100%;
    display: flex !important;
    align-items: center;
    cursor: pointer;
    z-index: 1;
    height: 100%;
}

/* De tekst labels (Links / Rechts) */
.position-toggle-switch .toggle-label {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b; /* Standaard inactieve kleur */
    transition: color 0.2s ease;
    z-index: 2; /* Zorg dat tekst boven de glider ligt */
    user-select: none;
}

/* De bewegende achtergrond (Glider) */
.position-toggle-switch label::before { 
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    
    /* STARTPOSITIE: RECHTS (Want unchecked = Rechtsonder in huidige logica) */
    left: 50%; 
    
    /* Breedte is 50% min een klein beetje voor de tussenruimte (gap) */
    width: calc(50% - 2px); 
    
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    
    /* Animatie snelheid exact gelijk aan witruimte toggle */
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* ACTIEVE STATUS LOGICA */

/* 1. De Glider Beweging */
/* Als checkbox is aangevinkt (Checked = Links actief), schuif de glider naar links */
.position-toggle-switch input:checked + label::before {
    transform: translateX(-100%) translateX(-4px); /* Schuif terug + correctie voor padding */
}

/* 2. Tekstkleuren */

/* Als UNCHECKED (Rechts is actief) -> Maak rechter tekst donker */
.position-toggle-switch input:not(:checked) + label .toggle-label[data-right] {
    color: #0f172a;
    font-weight: 600;
}

/* Als CHECKED (Links is actief) -> Maak linker tekst donker */
.position-toggle-switch input:checked + label .toggle-label[data-left] {
    color: #0f172a;
    font-weight: 600;
}

/* --- Range Slider met Waarde Display --- */
.range-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.range-slider-wrapper input[type="range"] {
    flex-grow: 1;
}


/* --- Kleur Input met Koppel-knop --- */
.color-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
    min-height: 32px; /* Zorg voor minimale hoogte */
}

/* Verberg de lelijke default input, maar houd hem klikbaar over de hele container */
.color-input-container input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0; /* Onzichtbaar */
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10; /* Zorg dat hij ALTIJD bovenop ligt */
    padding: 0;
    margin: 0;
    border: none;
}

/* Reset de link-toggle-button (Oude CSS verwijderen/overschrijven) */
.link-toggle-button {
    /* Reset basis eigenschappen */
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background-color: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #94a3b8;
    z-index: 20; /* Bovenop de disabled laag liggen */
}

/* BELANGRIJK: Verwijder de oude CSS-mask iconen zodat alleen FontAwesome werkt */
.link-toggle-button::before {
    content: none !important;
    mask-image: none !important;
    background-color: transparent !important;
}

/* Hover en Active states voor de knop */
.link-toggle-button:hover {
    background-color: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
}

/* --- LOGICA VOOR LINKED STATE --- */

/* Wanneer de kaart 'linked' is */
.color-card.is-linked {
    background-color: #f8fafc;
}

/* Dim de input container en header labels als hij gelinkt is */
.color-card.is-linked .color-input-container,
.color-card.is-linked label,
.color-card.is-linked .opacity-control {
    opacity: 0.5;
    pointer-events: none; /* Voorkom klikken op de input/slider */
}

/* Zorg dat de knop WEL klikbaar blijft en er actief uitziet */
.color-card.is-linked .link-toggle-button {
    opacity: 1;
    pointer-events: auto;
    color: #2563eb;
    background-color: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

/* Verberg de opacity slider als hij gelinkt is (optioneel, of gewoon dimmen zoals hierboven) */
.color-card.is-linked input[type="range"] {
    cursor: not-allowed;
}

/* --- Opacity Slider --- */
.opacity-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.slider-value {
    font-weight: 500;
    color: #374151;
    background-color: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    min-width: 45px;
    text-align: center;
}


/* --- Accordion Stijlen --- */
.accordion {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.accordion-header {
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb;
    width: 100%;
    padding: 1rem;
    text-align: left;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}
.accordion:last-child { margin-bottom: 0; }
.accordion-header:hover { background-color: #e5e7eb; }

.accordion.active{
    border: 1px solid #2563eb;
}
.accordion.active .accordion-header { background-color: #2563eb; color: white;}
.accordion-content {
    padding: 0 1.5rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.5s ease;
}
.accordion.active .accordion-content {
    padding: 1.5rem;
    opacity: 1;
    max-height: 1500px;
}


/* --- Rechter Preview Area --- */
.chatbot-preview-area {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #f9f9fc;
    background-image: radial-gradient(circle, #d1d5db 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative; /* BELANGRIJK: Maakt dit de 'parent' voor positionering */
}

/*
  Deze regel overschrijft 'position: fixed' uit widget.css
  alleen wanneer de chatbot zich BINNEN de preview-area bevindt.
*/
.chatbot-preview-area #chatbot-wrapper {
    position: absolute;
}

/* We zorgen dat de chatbot direct zichtbaar is in de preview */
.chatbot-preview-area #chatbot-container {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}
#live-preview-wrapper #chat-toggle { display: none; }


/* --- Stijlen voor Trainingsdata Tab --- */
.button-scrape {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #fff;
    background-color: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.button-scrape:hover {
    background-color: #1d4ed8;
}

.label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.button-text-file {
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #2563eb;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.button-text-file:hover {
    text-decoration: underline;
}
.hidden-file-input {
    display: none;
}

/* --- Stijlen voor Tekentellers Trainingsdata --- */
.total-char-counter-wrapper {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* AANGEPAST: Van ID naar Class voor hergebruik */
.total-char-count-display.limit-reached {
    color: #dc2626;
    font-weight: 600;
}

.counter-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.counter-text strong {
    font-weight: 600;
    color: #374151;
}

.total-char-count-display {
    font-weight: 500;
    color: #4b5563;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

/* AANGEPAST: Van ID naar Class voor hergebruik */
.progress-bar-fill-element {
    height: 100%;
    width: 0%;
    background-color: #2563eb;
    border-radius: 8px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-bar-fill-element.limit-reached {
    background-color: #dc2626;
}

.char-count {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
    margin-left: auto;
    margin-right: 12px;
}

/* De container voor de foutmelding, standaard verborgen */
.char-limit-error {
    display: none;
    color: #dc2626; /* Rood */
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 6px;
}

/* Stijlen die actief worden als de .form-group de .has-error class heeft */
.form-group.has-error .char-limit-error {
    display: block; /* Maak de foutmelding zichtbaar */
}

.form-group.has-error textarea {
    border-color: #dc2626; /* Maak de rand rood */
    box-shadow: 0 0 0 1px #dc2626; /* Voeg een subtiele gloed toe */
}

/* --- Stijlen voor Opslaan Knop Footer --- */

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    background-color: #ffffff;
    margin-top: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Container om de knoppen naast elkaar te zetten */
.footer-buttons-wrapper {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* Specifieke breedtes via Flexbox */
#save-and-go-test-config-button {
    flex: 1; /* Neemt 1 deel van de ruimte in */
}

#save-config-button {
    flex: 2; /* Neemt 2 delen van de ruimte in (dus breder) */
}

/* Groene variant van de moderne knop (voor Opslaan) */
.button-modern-icon.button-success {
    background-color: #16a34a; /* Groen */
    border-color: #15803d;
    color: #ffffff;
}

.button-modern-icon.button-success:hover {
    background-color: #15803d; /* Donkerder groen */
    border-color: #14532d;
    color: #ffffff;
    /* De transform en shadow erven automatisch van .button-modern-icon */
}

.save-status-container {
    height: 20px;
    text-align: center;
}

#save-status-message {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#save-status-message.success { color: #15803d; }
#save-status-message.error { color: #dc2626; }

/* --- Stijlen voor Bevestigings-popup (Modal) --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(17, 24, 39, 0.6); /* Donkere, half-transparante achtergrond */
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%); /* Start iets hoger voor animatie */
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -5px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 450px;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Zichtbare staat */
.modal-overlay.visible,
.modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal.visible {
    transform: translate(-50%, -50%); /* Eindpositie in het midden */
}

.modal-content {
    padding: 1.5rem 2rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.modal-body {
    padding: 1.5rem 0;
    font-size: 1rem;
    color: #4b5563;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-top: 1rem;
}


.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 1.5rem;
}

.modal-footer button {
    padding: 10px 16px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.button-secondary {
    background-color: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.button-secondary:hover {
    background-color: #f9fafb;
}

.button-confirm {
    background-color: #16a34a; /* Groen */
    color: #ffffff;
}

.button-confirm:hover {
    background-color: #15803d;
}

/* --- Stijlen voor abonnements-features --- */

.feature-lock-wrapper {
    position: relative;
}

/* Visuele staat voor een vergrendelde feature */
.feature-lock-wrapper.locked .feature-toggle {
    opacity: 0.6;
    background-color: #f3f4f6; /* Iets donkerder grijs */
    pointer-events: none; /* Voorkomt interactie met de toggle zelf */
}

/* Maakt de slider grijs en de input niet-klikbaar */
.feature-lock-wrapper.locked .feature-toggle input {
    pointer-events: none;
}

/* Stijlen voor de suggestie-inputs container */
.suggestion-inputs-container {
    display: none;
}

/* Toon de suggestie-inputs wanneer de toggle aanstaat */
#toggle-suggestions:checked + .slider + .suggestion-inputs-container {
    display: block;
}

/* Stijlen voor de suggestie-inputs in locked state */
.feature-lock-wrapper.locked .suggestion-inputs-container {
    display: none; /* Altijd verborgen als locked */
}

/* Stijlen voor de upgrade tooltip */
.upgrade-tooltip {
    display: none; /* Standaard verborgen */
    position: absolute;
    bottom: 100%; /* Plaats de tooltip BOVEN de feature-wrapper */
    left: 50%;
    transform: translateX(-50%); /* Centreer de tooltip horizontaal */
    width: 250px;
    background-color: #262626; /* Donkere achtergrond */
    color: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10;
    text-align: center;
}

.upgrade-tooltip::before { /* Pijltje dat naar beneden wijst */
    content: '';
    position: absolute;
    top: 100%; /* Aan de onderkant van de tooltip */
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #262626 transparent transparent transparent; /* Pijl naar boven qua kleur, dus wijst naar beneden */
}

/* Toon de tooltip op hover van de wrapper */
.feature-lock-wrapper.locked:hover .upgrade-tooltip {
    display: block;
}

.upgrade-tooltip p {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.upgrade-tooltip b {
    color: #ffffff;
}

.button-upgrade {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background-color: #2563eb;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button-upgrade:hover {
    background-color: #1d4ed8;
}

/* Utility class (kan hier of in chatbot-style) */
.hidden {
    display: none !important;
}

/* Background control buttons */
.background-controls {
    display: none !important;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    display: flex;
    gap: 8px;
}

.set-background-btn, .remove-background-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    background-color: #2563eb;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.set-background-btn:hover, .remove-background-btn:hover {
    background-color: #1d4ed8;
}

/* Background container for webpage content */
.webpage-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Allow interaction with elements below */
    overflow: hidden;
}

.webpage-background iframe {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0.8; /* Slightly transparent to allow chatbot to be visible */
}



/* === SCRAPING PROGRESS STYLES === */
.scrape-progress-container {
    margin-top: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fafafa;
}

.scrape-progress-bar {
    width: 100%;
    height: 16px;
    background-color: #e5e7eb;
    position: relative;
    overflow: hidden;
}

.scrape-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.3s ease;
    position: relative;
}

.scrape-progress-text {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: #4b5563;
    background-color: #f9fafb;
}

.scrape-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: move-stripes 1s linear infinite;
}

@keyframes move-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

.scrape-console {
    /* Increased max-height to show more rows */
    max-height: 400px;
    background-color: #1a1a1a;
    color: #e5e7eb;
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 0 0 8px 8px; /* Rounded bottom */
}

/* ... existing code ... */

.scrape-console-content {
    padding: 12px;
    font-size: 0.8rem; /* Consolas-like font size */
    font-family: 'Courier New', monospace;
    line-height: 1.5; /* Good line height for readability */
    
    /* Min-height ensuring ~5 rows visible (5 * 1.2rem + padding) */
    min-height: 120px; 
    max-height: 350px; /* Allow it to grow */
    
    overflow-y: auto;
    scroll-behavior: smooth;
}

.scrape-log {
    margin-bottom: 4px;
    opacity: 0.8;
}

.scrape-log:last-child {
    margin-bottom: 0;
    opacity: 1;
    color: #3b82f6;
}

.scrape-log.success {
    color: #10b981;
}

.scrape-log.error {
    color: #ef4444;
}

.scrape-log.warning {
    color: #f59e0b;
}

/* Console scrollbar styling */
.scrape-console-content::-webkit-scrollbar {
    width: 6px;
}

.scrape-console-content::-webkit-scrollbar-track {
    background: #262626;
}

.scrape-console-content::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 3px;
}

.scrape-console-content::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

/* --- Live Agent Schedule Styles --- */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

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

.day-toggle {
    display: flex;
    align-items: center;
    width: 60px;
}

.day-toggle label {
    margin: 0 0 0 8px !important;
    cursor: pointer;
    font-weight: 600 !important;
}

.time-input {
    padding: 6px !important;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    font-family: inherit;
    font-size: 0.85rem;
    width: auto !important;
    flex-grow: 1;
}

.hidden {
    display: none !important;
}

/* === NIEUWE SIDEBAR LAYOUT === */

/* Hoofdcontainer: Grid layout */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr 500px; /* Sidebar | Content | Preview */
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    transition: grid-template-columns 0.3s ease;
}

/* Modus voor instellingen zonder preview (verberg 3e kolom) */
.app-container.mode-settings {
    grid-template-columns: 260px 1fr 0px;
}

/* 1. Sidebar Styling */
.app-sidebar {
    background: #fff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;      /* Vul volledige hoogte */
    overflow: hidden;  /* Voorkom dubbele scrollbalken */
    z-index: 10;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0; /* Zorgt dat de header nooit krimpt/verdwijnt bij klein scherm */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.sidebar-header h2 { 
    margin: 0; 
    font-size: 1.25rem; 
    padding-left: 4px; /* Klein beetje uitlijnen met de knop tekst */
}

/* De sidebar navigatie lijst - dit is het enige dat scrollt */
.sidebar-nav {
    flex: 1;           /* Neem alle resterende ruimte in */
    overflow-y: auto;  /* Scrollbaar als de content te hoog is */
    padding: 1rem;
    min-height: 0;     /* Belangrijk voor Firefox flexbox scrolling */
}

.nav-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem 0.5rem;
}
.nav-category:first-child { margin-top: 0; }

.nav-btn {
    display: flex;        /* Flexbox voor icoon + tekst */
    align-items: center;  /* Verticaal centreren */
    gap: 12px;            /* Ruimte tussen icoon en tekst */
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    margin-bottom: 2px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #475569;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

/* Zorg dat het icoontje een vaste breedte heeft voor nette uitlijning onder elkaar */
.nav-btn i {
    width: 20px;
    text-align: center;
    color: #94a3b8; /* Iets lichtere kleur voor iconen */
    transition: color 0.2s;
}

.nav-btn:hover { background: #f1f5f9; color: #1e293b; }
.nav-btn:hover i { color: #475569; }

.nav-btn.active { background: #eff6ff; color: #2563eb; font-weight: 600; }
.nav-btn.active i { color: #2563eb; }

/* Sidebar Footer (Fixed bottom) */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0; /* Zorgt dat footer 'fixed' blijft staan en niet krimpt */
}

.footer-buttons { display: flex; gap: 10px; }
.footer-buttons button { flex: 1; }

/* 2. Content Area Styling */
.app-content {
    background: #f8fafc;
    overflow-y: hidden; /* Scroll gebeurt in de wrapper */
    position: relative;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    height: 100%;
    overflow-y: auto;
    padding: 2rem max(2rem, 5%);
}

.settings-panel {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.settings-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.settings-panel h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* 3. Preview Area aanpassingen */

/* Modus: Instellingen (Preview is verborgen) */
.app-container.mode-settings .chatbot-preview-area {
    opacity: 0;
    pointer-events: none;
    visibility: hidden; /* Zorgt dat het element genegeerd wordt door de browser */
}

/* Algemene stijl Preview Area */
.chatbot-preview-area {
    transition: opacity 0.2s, visibility 0.2s; /* Voeg visibility toe aan transitie */
    border-left: 1px solid #e5e7eb;
    
    /* CRUCIAAL: Dit voorkomt dat de chatbot buiten de kolom 'lekt' als de breedte 0px is */
    overflow: hidden; 
    
    position: relative;
    min-width: 0; /* Voorkomt dat de grid-kolom open geduwd wordt door de inhoud */
}

.form-group select {
    appearance: none; /* Verwijder standaard browser pijl */
    -webkit-appearance: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    padding-right: 32px; /* Ruimte voor pijl */
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    
    /* Custom Pijltje (SVG encoded) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.form-group select:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- VERNIEUWDE KLEUREN PANEEL STYLING --- */

.separator-subtle {
    border: none;
    border-top: 1px solid #cbd5e1;
    margin: 24px 0;
}

.color-section h3 {
    font-size: 0.95rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    font-weight: 700;
}

.section-sub-label {
    display: block;
    font-size: 0.95rem;      /* Was 0.85rem */
    color: #475569;          /* Was #64748b */
    text-transform: uppercase; /* Nieuw */
    letter-spacing: 0.05em;    /* Nieuw */
    font-weight: 700;        /* Was 600 */
    margin-bottom: 16px;     /* Meer ruimte */
    margin-top: 24px;
}
.section-sub-label:first-of-type {
    margin-top: 0;
}

/* Grids */
.color-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Color Card Container */
.color-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px; /* Iets meer ruimte */
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Meer ruimte tussen header en input */
    position: relative;
    height: 100%; /* CRUCIAAL: Vul de grid-cel volledig */
    box-sizing: border-box; 
}

.color-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* Header binnen de kaart (Label + Link knop) */
.color-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 28px; /* Zelfde hoogte als de link-button */
}

.color-header label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin: 0 !important; /* Reset margin from general styles */
}

/* Aangepaste Link Knop */
.link-toggle-button.small {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
}

.link-toggle-button.small:hover {
    background-color: #f1f5f9;
    color: #64748b;
}

/* Actieve 'Linked' staat */
.form-group.is-linked .link-toggle-button.small {
    color: #2563eb;
    background-color: #eff6ff;
}

/* De Input Container (Custom look voor de color picker) */
.color-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
}

/* Verberg de lelijke default input, maar houd hem klikbaar over de hele container */
.color-input-container input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

/* Onze mooie custom circle */
.color-preview-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    
    /* Dubbele rand truc: Witte rand binnenin, subtiele grijze rand buitenom */
    /* Dit werkt op zowel lichte als donkere kleuren goed */
    border: 2px solid #ffffff; 
    box-shadow: 0 0 0 1px #e2e8f0, 0 2px 4px rgba(0,0,0,0.05);
    
    flex-shrink: 0; /* Voorkom dat hij geplet wordt */
}

/* De Hex Code tekst */
.color-hex-value {
    font-family: 'Inter', monospace; /* Monospace voor nette uitlijning */
    font-size: 0.9rem;
    color: #64748b;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #f1f5f9;
    min-width: 70px;
    text-align: center;
}

/* Linked state styling voor de card zelf */
.form-group.is-linked .color-input-container {
    opacity: 0.7;
    pointer-events: none; /* Voorkom wijzigen als hij gelinkt is */
}

/* --- Speciale Lay-out voor Primaire + Hover --- */
.color-pair-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --- Opacity Controls binnen de card --- */
.opacity-control {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.opacity-control label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 4px;
    display: block;
}

.modern-slider-row,
.opacity-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* Zorg dat de badge breed genoeg is voor "400px" */
.slider-value-badge {
    min-width: 50px; 
    text-align: center;
    font-size: 0.8rem; /* Iets kleiner en strakker */
    font-weight: 600;
    color: #475569;
    background-color: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
}

/* --- Global Custom Slider Styling --- */
/* Dit zorgt dat sliders in de Layout tab er hetzelfde uitzien als in de Kleur tab */

.modern-slider-row input[type="range"] {
    -webkit-appearance: none; /* Verwijder standaard browser stijl */
    appearance: none;
    width: 100%;
    height: 6px; /* Dikte van de balk */
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

/* De knop (Thumb) - Chrome, Safari, Edge */
.modern-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #2563eb; /* Jouw primaire blauwe kleur */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
    border: 2px solid #ffffff; /* Wit randje voor luxe uitstraling */
    transition: transform 0.1s ease;
    margin-top: 0; /* Fix voor uitlijning */
}

/* De knop (Thumb) - Firefox */
.modern-slider-row input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #2563eb;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
    border: 2px solid #ffffff;
    transition: transform 0.1s ease;
}

/* Hover effect voor interactie */
.modern-slider-row input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* --- Message Groups (Sub-containers) --- */
.message-color-group {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #f1f5f9;
    margin-bottom: 16px;
}

.message-color-group .group-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 12px;
}

/* Fix voor slider inputs binnen cards */
.color-card input[type="range"] {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    -webkit-appearance: none;
}
.color-card input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #2563eb;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

/* --- 3. 3-Weg Toggle Switch (Compact/Normaal/Groot) --- */
.toggle-group-3 {
    position: relative;
    display: flex;
    background-color: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #e2e8f0;
    height: 42px; /* Vaste hoogte */
}

/* Verberg inputs */
.toggle-group-3 input[type="radio"] {
    display: none;
}

/* Labels */
.toggle-group-3 label {
    flex: 1;
    text-align: center;
    z-index: 2; /* Boven de glider */
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

/* Actieve tekst kleur */
.toggle-group-3 input:checked + label {
    color: #0f172a !important;
    font-weight: 600;
}

/* De bewegende achtergrond (Glider) */
.toggle-glider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(33.33% - 5px); /* 1/3e min padding */
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Posities van de glider */
/* input 1 checked -> default positie (0%) */
.toggle-group-3 input:nth-of-type(1):checked ~ .toggle-glider { transform: translateX(0%); }
/* input 2 checked -> verschuif 100% van zijn eigen breedte (+ beetje correctie voor gap) */
.toggle-group-3 input:nth-of-type(2):checked ~ .toggle-glider { transform: translateX(100%); left: 6px; } 
/* input 3 checked -> verschuif 200% */
.toggle-group-3 input:nth-of-type(3):checked ~ .toggle-glider { transform: translateX(200%); left: 8px; }

/* --- NIEUW: Training Editor Modal Styles --- */

/* Maak de modal breder en hoger */
.modal.large-modal {
    max-width: 90vw;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-content.full-height {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0; /* Reset padding voor custom layout */
    overflow: hidden;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
}

/* Split View Layout */
.split-view-body {
    display: flex;
    flex: 1;
    overflow: hidden; /* Belangrijk voor scrollen binnen panelen */
    margin: 0;
    padding: 0;
    border: none;
}

/* Sidebar (Pagina lijst) */
.editor-sidebar {
    width: 300px;
    border-right: 1px solid #e5e7eb;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-search {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.sidebar-search input {
    width: 100%;
    padding: 8px 8px 8px 30px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.sidebar-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.8rem;
}

.page-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.page-list-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.page-list-item:hover {
    background-color: #e2e8f0;
}

.page-list-item.active {
    background-color: #eff6ff;
    border-left: 3px solid #2563eb;
}

.page-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-url {
    font-size: 0.75rem;
    color: #94a3b8;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-stats {
    padding: 8px 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: #64748b;
    background-color: #fff;
}

/* Main Editor Area */
.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    background-color: #fff;
    min-width: 0; /* Voorkomt flexbox overflow issues */
}

.editor-toolbar {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editor-title-input {
    font-size: 1rem;
    font-weight: 600;
    border: none;
    outline: none;
    width: 100%;
    color: #1e293b;
}

.editor-url-input {
    font-size: 0.85rem;
    color: #2563eb;
    border: none;
    outline: none;
    width: 100%;
    background-color: #f8fafc;
    padding: 4px 8px;
    border-radius: 4px;
}

#active-page-content {
    flex: 1;
    border: none;
    resize: none;
    padding: 16px;
    font-family: var(--main-font), 'Inter', sans-serif; 
    font-size: 0.95rem; /* Iets groter voor leesbaarheid */
    line-height: 1.6;
    outline: none;
    color: #334155;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    font-size: 0.85rem;
    color: #64748b;
}

.button-group-small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.separator-vertical {
    color: #cbd5e1;
}

.button-editor-trigger {
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #2563eb; /* Blauw */
    background: #eff6ff; /* Lichtblauwe achtergrond */
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px 10px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.button-editor-trigger:hover {
    background-color: #dbeafe;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

/* --- Modern Live Agent Styles --- */

/* --- Modern Live Agent Styles (Fixed Layout) --- */

.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* De container voor het rooster */
.schedule-grid-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Elke rij (Maandag, Dinsdag, etc.) */
.schedule-row-modern {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Spreid links en rechts uit */
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    transition: border-color 0.2s;
    height: 42px; /* Vaste hoogte voor consistentie */
}

.schedule-row-modern:hover {
    border-color: #cbd5e1;
}

/* De linker kant: Checkbox + Dagnaam */
.day-check-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex-grow: 1; /* Laat dit gedeelte klikken */
    height: 100%;
    margin: 0 !important; /* Reset default label margins */
}

.day-check-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #2563eb;
    border-radius: 4px;
}

.day-check-wrapper span {
    font-weight: 500;
    color: #334155;
    font-size: 0.9rem;
    user-select: none;
}

/* De rechter kant: Tijd inputs */
.time-range-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* De input zelf */
.time-input-modern {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 8px;
    font-family: 'Inter', sans-serif; /* Gebruik systeem font, geen monospace */
    font-size: 0.85rem;
    color: #334155;
    background-color: #f8fafc;
    width: 90px;
    cursor: pointer;
    height: 32px;
    box-sizing: border-box;
    transition: all 0.2s;
}

.time-input-modern:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.time-sep {
    color: #94a3b8;
    font-weight: 500;
}

/* Als een dag uitgevinkt is, maak de tijd dan grijs */
.schedule-row-modern:has(input[type="checkbox"]:not(:checked)) .time-range-wrapper {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
}

.schedule-row-modern:has(input[type="checkbox"]:not(:checked)) .day-check-wrapper span {
    color: #94a3b8; /* Lichtere tekst voor dagnaam */
}