/* ============================================================
   Tachograaf Service Nederland DET Lookup – Stylesheet v1.0.0
   Scoped onder #tsn-det-wrapper om Transportex conflicts te vermijden
   ============================================================ */

#tsn-det-wrapper * {
    box-sizing: border-box;
}

/* ── Formulierkaart ── */
#tsn-det-wrapper .tsn-det-form-card {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px;
    max-width: 560px;
    margin: 0 auto 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

#tsn-det-wrapper .tsn-det-form-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#tsn-det-wrapper .tsn-det-label {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}

/* ── Invoerij ── */
#tsn-det-wrapper .tsn-det-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* ── Kentekenveldje met NL-badge ── */
#tsn-det-wrapper .tsn-det-kenteken-container {
    display: flex;
    align-items: center;
    border: 3px solid #003082;
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    background: #fff;
}

#tsn-det-wrapper .tsn-det-nl-badge {
    background: #003082;
    color: #f7c300;
    font-weight: 900;
    font-size: 13px;
    padding: 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
    min-height: 50px;
    flex-shrink: 0;
}

#tsn-det-wrapper .tsn-det-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 12px 14px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    color: #111 !important;
    background: #fff !important;
    flex: 1;
    width: 100%;
    text-transform: uppercase;
    font-family: 'Courier New', Courier, monospace !important;
}

#tsn-det-wrapper .tsn-det-input::placeholder {
    color: #bbb !important;
    letter-spacing: 2px;
    font-weight: 400;
}

/* ── Knop ── */
#tsn-det-wrapper .tsn-det-btn {
    background: linear-gradient(135deg, #FF6B00 0%, #F57C00 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 50px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(255,107,0,0.35);
}

#tsn-det-wrapper .tsn-det-btn:hover {
    background: linear-gradient(135deg, #e55a00 0%, #d06800 100%);
    box-shadow: 0 4px 12px rgba(255,107,0,0.45);
    transform: translateY(-1px);
}

#tsn-det-wrapper .tsn-det-btn:active {
    transform: translateY(0);
}

#tsn-det-wrapper .tsn-det-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#tsn-det-wrapper .tsn-det-hint {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* ── Laadindicator ── */
#tsn-det-wrapper .tsn-det-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tsn-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes tsn-spin {
    to { transform: rotate(360deg); }
}

/* ── Resultatenkaart ── */
#tsn-det-wrapper .tsn-det-result {
    max-width: 560px;
    margin: 0 auto;
    animation: tsn-fade-in 0.3s ease;
}

@keyframes tsn-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Kentekenplaat header */
#tsn-det-wrapper .tsn-det-plate-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 12px 12px 0 0;
    padding: 18px 22px;
    border-bottom: none;
}

#tsn-det-wrapper .tsn-det-plate {
    background: #f7c300;
    border: 2px solid #003082;
    border-radius: 6px;
    padding: 6px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 3px;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
}

#tsn-det-wrapper .tsn-det-plate-nl {
    background: #003082;
    color: #f7c300;
    font-size: 10px;
    font-weight: 900;
    border-radius: 3px;
    padding: 2px 4px;
    letter-spacing: 0.5px;
}

#tsn-det-wrapper .tsn-det-voertuig-naam {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
}

#tsn-det-wrapper .tsn-det-voertuig-soort {
    font-size: 13px;
    color: #777;
    margin-top: 2px;
}

/* DET badge */
#tsn-det-wrapper .tsn-det-info-bar {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-top: none;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#tsn-det-wrapper .tsn-det-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #003082;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    padding: 5px 14px;
}

#tsn-det-wrapper .tsn-det-badge-label {
    font-size: 12px;
    color: #888;
}

/* Hoofdresultaatblok */
#tsn-det-wrapper .tsn-det-main-result {
    border: 2px solid #e8e8e8;
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

/* Kleurcodering per tachograaftype */
#tsn-det-wrapper .tsn-det-type-header {
    padding: 20px 22px 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

#tsn-det-wrapper .tsn-det-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

#tsn-det-wrapper .tsn-det-type-texts {
    flex: 1;
}

#tsn-det-wrapper .tsn-det-type-generatie {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}

#tsn-det-wrapper .tsn-det-type-label {
    font-size: 18px;
    font-weight: 800;
    color: #111;
    line-height: 1.2;
    margin-bottom: 4px;
}

#tsn-det-wrapper .tsn-det-type-detail {
    font-size: 13px;
    color: #555;
}

/* Klassen */
#tsn-det-wrapper .tsn-det-klasse-analoog .tsn-det-type-header { background: #f5f0e8; }
#tsn-det-wrapper .tsn-det-klasse-analoog .tsn-det-type-icon  { background: #e8d9b8; }
#tsn-det-wrapper .tsn-det-klasse-analoog .tsn-det-type-generatie { color: #8b6914; }

#tsn-det-wrapper .tsn-det-klasse-g1 .tsn-det-type-header { background: #eaf2ff; }
#tsn-det-wrapper .tsn-det-klasse-g1 .tsn-det-type-icon  { background: #c5deff; }
#tsn-det-wrapper .tsn-det-klasse-g1 .tsn-det-type-generatie { color: #1a5dad; }

#tsn-det-wrapper .tsn-det-klasse-g2v1 .tsn-det-type-header { background: #edfaf2; }
#tsn-det-wrapper .tsn-det-klasse-g2v1 .tsn-det-type-icon  { background: #b8f0d0; }
#tsn-det-wrapper .tsn-det-klasse-g2v1 .tsn-det-type-generatie { color: #147a45; }

#tsn-det-wrapper .tsn-det-klasse-g2v2 .tsn-det-type-header { background: #fff7e6; }
#tsn-det-wrapper .tsn-det-klasse-g2v2 .tsn-det-type-icon  { background: #ffd580; }
#tsn-det-wrapper .tsn-det-klasse-g2v2 .tsn-det-type-generatie { color: #b35a00; }

/* DET-periode balk */
#tsn-det-wrapper .tsn-det-periode-bar {
    background: #f8f8f8;
    border-top: 1px solid #eee;
    padding: 12px 22px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

#tsn-det-wrapper .tsn-det-periode-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#tsn-det-wrapper .tsn-det-periode-item span:first-child {
    font-size: 11px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#tsn-det-wrapper .tsn-det-periode-item span:last-child {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

/* Modellen lijst */
#tsn-det-wrapper .tsn-det-modellen {
    border-top: 1px solid #eee;
    padding: 16px 22px;
    background: #fff;
}

#tsn-det-wrapper .tsn-det-modellen-title {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

#tsn-det-wrapper .tsn-det-modellen-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#tsn-det-wrapper .tsn-det-modellen-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

#tsn-det-wrapper .tsn-det-modellen-list li::before {
    content: '✓';
    color: #FF6B00;
    font-weight: 900;
    font-size: 13px;
    flex-shrink: 0;
}

/* Sensor balk */
#tsn-det-wrapper .tsn-det-sensor-bar {
    border-top: 1px solid #eee;
    padding: 12px 22px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    gap: 10px;
}

#tsn-det-wrapper .tsn-det-sensor-icon {
    font-size: 18px;
    flex-shrink: 0;
}

#tsn-det-wrapper .tsn-det-sensor-text {
    font-size: 13px;
    color: #444;
}

#tsn-det-wrapper .tsn-det-sensor-text strong {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* Opmerking */
#tsn-det-wrapper .tsn-det-opmerking {
    border-top: 1px solid #eee;
    padding: 12px 22px;
    background: #fffbf0;
    font-size: 13px;
    color: #7a5500;
    font-weight: 500;
}

/* CTA */
#tsn-det-wrapper .tsn-det-cta {
    border-top: 2px solid #eee;
    padding: 18px 22px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

#tsn-det-wrapper .tsn-det-cta-text {
    font-size: 14px;
    color: #444;
}

#tsn-det-wrapper .tsn-det-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B00 0%, #F57C00 100%);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(255,107,0,0.3);
    white-space: nowrap;
}

#tsn-det-wrapper .tsn-det-cta-btn:hover {
    background: linear-gradient(135deg, #e55a00 0%, #d06800 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255,107,0,0.4);
}

/* Foutmelding */
#tsn-det-wrapper .tsn-det-error {
    background: #fff0f0;
    border: 2px solid #f5c6cb;
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #721c24;
    font-size: 14px;
    font-weight: 600;
}

#tsn-det-wrapper .tsn-det-error-icon {
    font-size: 24px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 540px) {
    #tsn-det-wrapper .tsn-det-form-card {
        padding: 20px 16px;
    }
    #tsn-det-wrapper .tsn-det-input-row {
        flex-direction: column;
    }
    #tsn-det-wrapper .tsn-det-btn {
        width: 100%;
        min-height: 46px;
    }
    #tsn-det-wrapper .tsn-det-plate-header {
        flex-direction: column;
        gap: 10px;
    }
    #tsn-det-wrapper .tsn-det-cta {
        flex-direction: column;
        text-align: center;
    }
    #tsn-det-wrapper .tsn-det-cta-btn {
        width: 100%;
        text-align: center;
    }
    #tsn-det-wrapper .tsn-det-periode-bar {
        flex-direction: column;
        gap: 10px;
    }
}

/* ============================================================
   Tachograaf Service Nederland DET Lookup v1.1.0 – Vervoerskeuze + Plicht-blok
   ============================================================ */

/* ── Vervoerstype toggle ── */
#tsn-det-wrapper .tsn-det-vervoer-label {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

#tsn-det-wrapper .tsn-det-vervoer-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#tsn-det-wrapper .tsn-det-toggle-btn {
    flex: 1;
    min-width: 140px;
    padding: 11px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f8f8f8;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}

#tsn-det-wrapper .tsn-det-toggle-btn:hover {
    border-color: #FF6B00;
    color: #FF6B00;
    background: #fff5ee;
}

#tsn-det-wrapper .tsn-det-toggle-btn.tsn-det-toggle-active {
    background: #FF6B00;
    border-color: #FF6B00;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,107,0,0.3);
}

/* ── Info-balk vervoerbadge ── */
#tsn-det-wrapper .tsn-det-badge-vervoer {
    background: #555;
}

/* ── Tachograafplicht blok ── */
#tsn-det-wrapper .tsn-det-plicht-blok {
    border: 2px solid #e8e8e8;
    border-top: none;
    padding: 16px 22px;
}

#tsn-det-wrapper .tsn-det-plicht-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

#tsn-det-wrapper .tsn-det-plicht-icon {
    font-size: 26px;
    flex-shrink: 0;
    line-height: 1.2;
}

#tsn-det-wrapper .tsn-det-plicht-titel {
    font-size: 15px;
    font-weight: 800;
    color: #111;
    margin-bottom: 4px;
}

#tsn-det-wrapper .tsn-det-plicht-tekst {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}

/* Kleuren per status */
#tsn-det-wrapper .plicht-verplicht {
    background: #fff3f3;
    border-color: #f5c6cb;
}
#tsn-det-wrapper .plicht-verplicht .tsn-det-plicht-titel {
    color: #c0392b;
}

#tsn-det-wrapper .plicht-attentie {
    background: #fffbf0;
    border-color: #ffe082;
}
#tsn-det-wrapper .plicht-attentie .tsn-det-plicht-titel {
    color: #b35a00;
}

#tsn-det-wrapper .plicht-vrij {
    background: #f0faf4;
    border-color: #b7dfca;
}
#tsn-det-wrapper .plicht-vrij .tsn-det-plicht-titel {
    color: #1a7a45;
}

#tsn-det-wrapper .plicht-onbekend {
    background: #f8f8f8;
    border-color: #ddd;
}

/* ── G2V2 upgrade-banner ── */
#tsn-det-wrapper .tsn-det-g2v2-banner {
    border: 2px solid #f7c300;
    border-top: none;
    background: #fffbea;
    padding: 14px 22px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

#tsn-det-wrapper .tsn-det-g2v2-icon {
    font-size: 22px;
    flex-shrink: 0;
}

#tsn-det-wrapper .tsn-det-g2v2-banner > div {
    flex: 1;
    font-size: 13px;
    color: #5a4000;
    line-height: 1.5;
}

#tsn-det-wrapper .tsn-det-g2v2-banner strong {
    display: block;
    font-size: 14px;
    color: #3a2800;
    margin-bottom: 3px;
}

#tsn-det-wrapper .tsn-det-g2v2-link {
    align-self: center;
    background: #f7c300;
    color: #3a2800 !important;
    text-decoration: none !important;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.15s;
}

#tsn-det-wrapper .tsn-det-g2v2-link:hover {
    background: #e5b400;
}

/* Responsive aanpassingen voor nieuwe elementen */
@media (max-width: 540px) {
    #tsn-det-wrapper .tsn-det-vervoer-toggle {
        flex-direction: column;
    }
    #tsn-det-wrapper .tsn-det-toggle-btn {
        min-width: unset;
    }
    #tsn-det-wrapper .tsn-det-g2v2-banner {
        flex-direction: column;
    }
    #tsn-det-wrapper .tsn-det-g2v2-link {
        width: 100%;
        text-align: center;
    }
}
