/* tweedehandsiphone.nl - Custom CSS */

/* Modelpagina achtergrond foto */
.model-bg {
    position: fixed;
    top: 120px;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.04;
    filter: grayscale(100%);
    pointer-events: none;
    z-index: -1;
}

/* Kleurenpalet
   Primary:    #30A423
   Hero:       #41DC2F
   Success:    #95D43D
   Caution:    #E9CB06
   Danger:     #E42A2D
   Info:       #1625DF
   Neutral:    #101110
*/
:root {
    --bs-primary: #30A423;
    --bs-primary-rgb: 48, 164, 35;
    --bs-success: #95D43D;
    --bs-success-rgb: 149, 212, 61;
    --bs-danger: #E42A2D;
    --bs-danger-rgb: 228, 42, 45;
    --bs-warning: #E9CB06;
    --bs-warning-rgb: 233, 203, 6;
    --bs-info: #1625DF;
    --bs-info-rgb: 22, 37, 223;
    --bs-link-color: #30A423;
    --bs-link-color-rgb: 48, 164, 35;
    --bs-link-hover-color: #28891d;
    --bs-link-hover-color-rgb: 40, 137, 29;
}

/* Primary */
.btn-primary {
    --bs-btn-bg: #30A423;
    --bs-btn-border-color: #30A423;
    --bs-btn-hover-bg: #28891d;
    --bs-btn-hover-border-color: #227619;
    --bs-btn-active-bg: #227619;
    --bs-btn-active-border-color: #1c6315;
    --bs-btn-disabled-bg: #30A423;
    --bs-btn-disabled-border-color: #30A423;
    --bs-btn-color: #fff;
}
.btn-outline-primary {
    --bs-btn-color: #30A423;
    --bs-btn-border-color: #30A423;
    --bs-btn-hover-bg: #30A423;
    --bs-btn-hover-border-color: #30A423;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #28891d;
    --bs-btn-active-border-color: #28891d;
    --bs-btn-active-color: #fff;
}
.bg-primary { background-color: #30A423 !important; }
.text-primary { color: #30A423 !important; }
.border-primary { border-color: #30A423 !important; }

/* Primary dark (voor prijzen, schildjes) */
.bg-primary-dark { background-color: #1c6315 !important; color: #fff !important; }
.text-primary-dark { color: #1c6315 !important; }

/* Success */
.btn-success {
    --bs-btn-bg: #95D43D;
    --bs-btn-border-color: #95D43D;
    --bs-btn-hover-bg: #7db832;
    --bs-btn-hover-border-color: #6ea22c;
    --bs-btn-active-bg: #6ea22c;
    --bs-btn-active-border-color: #608d26;
    --bs-btn-color: #fff;
}
.btn-outline-success {
    --bs-btn-color: #95D43D;
    --bs-btn-border-color: #95D43D;
    --bs-btn-hover-bg: #95D43D;
    --bs-btn-hover-border-color: #95D43D;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #7db832;
    --bs-btn-active-color: #fff;
}
.bg-success { background-color: #95D43D !important; }
.text-success { color: #95D43D !important; }

/* Danger */
.btn-danger {
    --bs-btn-bg: #E42A2D;
    --bs-btn-border-color: #E42A2D;
    --bs-btn-hover-bg: #c32325;
    --bs-btn-hover-border-color: #ad1f21;
    --bs-btn-active-bg: #ad1f21;
    --bs-btn-color: #fff;
}
.bg-danger { background-color: #E42A2D !important; }
.text-danger { color: #E42A2D !important; }

/* Warning / Caution */
.btn-warning {
    --bs-btn-bg: #E9CB06;
    --bs-btn-border-color: #E9CB06;
    --bs-btn-hover-bg: #c7ad05;
    --bs-btn-hover-border-color: #b09904;
    --bs-btn-active-bg: #b09904;
    --bs-btn-color: #101110;
}
.bg-warning { background-color: #E9CB06 !important; }
.text-warning { color: #E9CB06 !important; }

/* Info */
.btn-info {
    --bs-btn-bg: #1625DF;
    --bs-btn-border-color: #1625DF;
    --bs-btn-hover-bg: #121eba;
    --bs-btn-hover-border-color: #0f1a9e;
    --bs-btn-active-bg: #0f1a9e;
    --bs-btn-color: #fff;
}
.bg-info { background-color: #1625DF !important; color: #fff !important; }
.text-info { color: #1625DF !important; }

/* Forms */
.form-check-input:checked {
    background-color: #30A423;
    border-color: #30A423;
}
.form-control:focus, .form-select:focus {
    border-color: #30A423;
    box-shadow: 0 0 0 0.25rem rgba(48, 164, 35, 0.25);
}

/* Links */
a { color: #30A423; }
a:hover { color: #28891d; }

/* Badges */
.badge { font-weight: 500; }

/* Hero - 75% van primary #30A423 → gemengd met wit */
.hero-section { background-color: #64BB5a; color: #fff; }
.btn-hero {
    --bs-btn-bg: #64BB5a;
    --bs-btn-border-color: #64BB5a;
    --bs-btn-hover-bg: #56a94e;
    --bs-btn-hover-border-color: #4a9743;
    --bs-btn-active-bg: #4a9743;
    --bs-btn-active-border-color: #3f8539;
    --bs-btn-color: #fff;
    --bs-btn-disabled-bg: #64BB5a;
    --bs-btn-disabled-border-color: #64BB5a;
}
.btn-outline-hero {
    --bs-btn-color: #4a9743;
    --bs-btn-border-color: #64BB5a;
    --bs-btn-hover-bg: #64BB5a;
    --bs-btn-hover-border-color: #64BB5a;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #56a94e;
    --bs-btn-active-border-color: #56a94e;
    --bs-btn-active-color: #fff;
}

/* Voordelen / Nadelen (transparant) */
.bg-pros { background-color: rgba(48, 164, 35, 0.12); color: #1c6315; }
.bg-cons { background-color: rgba(228, 42, 45, 0.12); color: #b71c1c; }

/* Prijstabel */
.table th { white-space: nowrap; }
.table td { vertical-align: middle; }
.abo-card .table thead th { background: transparent; }

/* Cards */
.card { border-radius: 0.5rem; }
.card-header { border-radius: 0.5rem 0.5rem 0 0 !important; }

/* Specs sticky sidebar */
.specs-sticky {
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

/* "Toch liever nieuw?" card */
.new-price-card { border-color: rgba(0,0,0,.12); color: #777; }
.new-price-card .card-header { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); color: #666; }
.new-price-card .card-footer { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
.new-price-link { color: #777; }
.new-price-link:hover { color: #000; }
[data-bs-theme=dark] .new-price-card { border-color: rgba(255,255,255,.12); color: #888; }
[data-bs-theme=dark] .new-price-card .card-header { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); color: #999; }
[data-bs-theme=dark] .new-price-card .card-footer { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
[data-bs-theme=dark] .new-price-link { color: #888; }
[data-bs-theme=dark] .new-price-link:hover { color: #fff; }

/* Specs tabel rechterkolom */
.col-lg-4 .table th {
    width: 40%;
    font-weight: 600;
    font-size: 0.875rem;
    color: #555;
    padding-left: 1rem;
}
.col-lg-4 .table td {
    padding-right: 1rem;
}
.col-lg-4 .table td {
    font-size: 0.875rem;
}

/* Headings */
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; margin-top: 2rem; }
h3 { font-size: 1.1rem; margin-top: 1.5rem; }

/* Footer */
footer { color: #adb5bd; }
footer h6 { color: #f8f9fa; }
footer p, footer li { color: #9aa0a6; }
footer a { color: #9aa0a6 !important; text-decoration: none; }
footer a:hover { color: #fff !important; }
footer .footer-group { color: #ced4da; }

/* Dark mode (via data-bs-theme="dark") */
[data-bs-theme="dark"] {
    --bs-body-bg: #101110;
    --bs-body-color: #e0e0e0;
    --bs-link-color: #41DC2F;
    --bs-link-hover-color: #6ae85a;
}
[data-bs-theme="dark"] a { color: #41DC2F; }
[data-bs-theme="dark"] a:hover { color: #6ae85a; }
[data-bs-theme="dark"] .bg-light { background-color: #1a1b1a !important; }
[data-bs-theme="dark"] .text-muted { color: #8d99ae !important; }
[data-bs-theme="dark"] .col-lg-4 .table th { color: #8d99ae; }
[data-bs-theme="dark"] .hero-section { background-color: #2e9d21; }
[data-bs-theme="dark"] .btn-hero { --bs-btn-bg: #2e9d21; --bs-btn-border-color: #2e9d21; --bs-btn-hover-bg: #36b827; --bs-btn-hover-border-color: #36b827; }
[data-bs-theme="dark"] .btn-outline-hero { --bs-btn-color: #41DC2F; --bs-btn-border-color: #41DC2F; --bs-btn-hover-bg: #41DC2F; --bs-btn-hover-border-color: #41DC2F; }
[data-bs-theme="dark"] .card { background-color: #1a1b1a; border-color: #2a2b2a; }
[data-bs-theme="dark"] .card-header { background-color: #222322; border-color: #2a2b2a; }
[data-bs-theme="dark"] .table { --bs-table-bg: #1a1b1a; --bs-table-color: #e0e0e0; --bs-table-border-color: #2a2b2a; }
[data-bs-theme="dark"] .table-light { --bs-table-bg: #222322; --bs-table-color: #e0e0e0; }
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * { --bs-table-bg-state: #252625; }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { background-color: #1a1b1a; border-color: #2a2b2a; color: #e0e0e0; }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: #41DC2F; --bs-btn-border-color: #41DC2F; --bs-btn-hover-bg: #41DC2F; --bs-btn-hover-border-color: #41DC2F; }
[data-bs-theme="dark"] .alert-light { background-color: #1a1b1a; border-color: #2a2b2a; color: #e0e0e0; }
[data-bs-theme="dark"] .breadcrumb-item a { color: #41DC2F; }
[data-bs-theme="dark"] .badge.bg-primary-dark { background-color: #2e9d21 !important; }
[data-bs-theme="dark"] .dropdown-menu { background-color: #1a1b1a; border-color: #2a2b2a; }
[data-bs-theme="dark"] .dropdown-item { color: #e0e0e0; }
[data-bs-theme="dark"] .dropdown-item:hover { background-color: #252625; color: #41DC2F; }
[data-bs-theme="dark"] .dropdown-header { color: #8d99ae; }
[data-bs-theme="dark"] .bg-pros { background-color: rgba(65, 220, 47, 0.15); color: #6ae85a; }
[data-bs-theme="dark"] .bg-cons { background-color: rgba(228, 42, 45, 0.15); color: #f87171; }

/* ============================================
   ACCESSIBILITY WIDGET
   ============================================ */

button.accessibility-toggle {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 1050;
    background: #fff;
    border: 2px solid #333;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: background 0.2s, color 0.2s;
}
button.accessibility-toggle:hover,
button.accessibility-toggle:focus {
    background: #333;
    color: #fff;
    outline: 3px solid #30A423;
    outline-offset: 2px;
}
button.accessibility-toggle i.bi { font-size: 24px; line-height: 1; }

.accessibility-panel {
    position: fixed;
    bottom: 72px;
    right: 16px;
    z-index: 1049;
    background: #fff;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    min-width: 280px;
    display: none;
}
.accessibility-panel.show { display: block; }
.accessibility-panel h6 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
    font-weight: 700;
}
.accessibility-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}
.accessibility-option:last-of-type { border-bottom: none; }
.accessibility-option label { margin: 0; cursor: pointer; font-weight: 500; }

[data-bs-theme="dark"] button.accessibility-toggle { background: #1a1b1a; border-color: #555; color: #e0e0e0; }
[data-bs-theme="dark"] button.accessibility-toggle:hover,
[data-bs-theme="dark"] button.accessibility-toggle:focus { background: #555; color: #fff; }
[data-bs-theme="dark"] .accessibility-panel { background: #1a1b1a; border-color: #555; color: #e0e0e0; }
[data-bs-theme="dark"] .accessibility-panel h6 { border-color: #555; }
[data-bs-theme="dark"] .accessibility-option { border-color: #333; }

/* High Contrast Mode */
body.high-contrast { background-color: #fff !important; color: #000 !important; }
body.high-contrast * { border-color: #000 !important; }
body.high-contrast a { color: #000 !important; text-decoration: underline !important; }
body.high-contrast a:hover,
body.high-contrast a:focus { background-color: #ffff00 !important; outline: 3px solid #000 !important; }
body.high-contrast .btn { background-color: #000 !important; color: #fff !important; border: 2px solid #000 !important; }
body.high-contrast .btn:hover,
body.high-contrast .btn:focus { background-color: #333 !important; outline: 3px solid #000 !important; }
body.high-contrast .btn-outline-light,
body.high-contrast .btn-outline-primary,
body.high-contrast .btn-outline-hero { background-color: #fff !important; color: #000 !important; }
body.high-contrast .model-bg { display: none !important; }

/* Navbar: hover dropdown op desktop, klik navigeert */
@media (min-width: 992px) {
    .nav-hover:hover > .dropdown-menu { display: block; margin-top: 0; }
    .nav-hover > .dropdown-toggle::after { margin-left: .3em; }
}

body.high-contrast .navbar, body.high-contrast .bg-dark { background-color: #000 !important; }
body.high-contrast .navbar a { color: #fff !important; }
body.high-contrast .card { border: 2px solid #000 !important; background: #fff !important; }
body.high-contrast .form-control,
body.high-contrast .form-select { border: 2px solid #000 !important; background: #fff !important; color: #000 !important; }
body.high-contrast .form-control:focus,
body.high-contrast .form-select:focus { outline: 3px solid #000 !important; box-shadow: none !important; background: #ffff00 !important; }
body.high-contrast .text-muted { color: #333 !important; }
body.high-contrast .badge { background-color: #000 !important; color: #fff !important; }
body.high-contrast footer { background-color: #000 !important; color: #fff !important; }
body.high-contrast footer a { color: #fff !important; }
body.high-contrast .hero-section { background-color: #000 !important; }
body.high-contrast :focus-visible { outline: 3px solid #000 !important; outline-offset: 2px; }

/* Large Text Mode */
body.large-text { font-size: 1.25rem !important; }
body.large-text h1:not([class*="display-"]) { font-size: 2rem !important; }
body.large-text h2 { font-size: 1.625rem !important; }
body.large-text h3 { font-size: 1.375rem !important; }
body.large-text p, body.large-text li { line-height: 1.8 !important; }
body.large-text .btn { padding: 0.75rem 1.5rem !important; font-size: 1.125rem !important; }
body.large-text .form-control,
body.large-text .form-select { font-size: 1.125rem !important; padding: 0.75rem !important; }

/* Dyslexic Font */
@font-face {
    font-family: 'OpenDyslexic';
    src: url('/public/fonts/opendyslexic/OpenDyslexic-Regular.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'OpenDyslexic';
    src: url('/public/fonts/opendyslexic/OpenDyslexic-Bold.woff') format('woff');
    font-weight: bold; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'OpenDyslexic';
    src: url('/public/fonts/opendyslexic/OpenDyslexic-Italic.woff') format('woff');
    font-weight: normal; font-style: italic; font-display: swap;
}
body.dyslexic-font, body.dyslexic-font * {
    font-family: 'OpenDyslexic', Arial, sans-serif !important;
}
body.dyslexic-font main, body.dyslexic-font main * {
    line-height: 1.8 !important;
    word-spacing: 0.2em !important;
    letter-spacing: 0.05em !important;
}
body.dyslexic-font button.accessibility-toggle,
body.dyslexic-font button.accessibility-toggle *,
body.dyslexic-font .accessibility-panel,
body.dyslexic-font .accessibility-panel * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    word-spacing: 0 !important;
    letter-spacing: 0 !important;
}

/* Mobile optimalisaties */
@media (max-width: 768px) {
    .display-5 { font-size: 1.75rem; }
    .lead { font-size: 1rem; }
}
