/* ============================================
   COLOR PALETTE
   ============================================ */
:root {
    /* Automotive / EV dashboard */
    --color-primary: #0D1117;
    /* Primary Dark */
    --color-secondary: #1B2430;
    /* Primary Gray */

    --color-accent-blue: #3FA9F5;
    /* EV Blue */
    --color-accent-green: #5BE595;
    /* Energy / Eco Green */

    --color-warning: #FFB449;
    /* Amber Warning */
    --color-danger: #FF3B3B;
    /* Critical Error */

    --text-primary-light: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.45);

    /* Left panel / layout extra tokens */
    --primary-dark: #0D0F11;
    --primary-neutral: #1A1D20;
    --secondary-blue-gray: #3C4A57;
    --accent-blue: #2E8AE6;

    /* Urgency Level Colors for Telltale Icons */
    --urgency-warning-high: #dc3545;
    --urgency-warning-middle: #fd7e14;
    --urgency-warning-low: #ffc107;
    --urgency-caution: #0dcaf0;
    --urgency-notification: #6c757d;
    --urgency-feedback: #198754;
}

/* ============================================
   COLOR PALETTE
   ============================================ */
:root {
    /* Automotive / EV dashboard */
    --color-primary: #0D1117;
    /* Primary Dark */
    --color-secondary: #1B2430;
    /* Primary Gray */

    --color-accent-blue: #3FA9F5;
    /* EV Blue */
    --color-accent-green: #5BE595;
    /* Energy / Eco Green */

    --color-warning: #FFB449;
    /* Amber Warning */
    --color-danger: #FF3B3B;
    /* Critical Error */

    --text-primary-light: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.45);

    /* Left panel / layout extra tokens */
    --primary-dark: #0D0F11;
    --primary-neutral: #1A1D20;
    --secondary-blue-gray: #3C4A57;
    --accent-blue: #2E8AE6;
}

/* ============================================
   GLOBAL LAYOUT
   ============================================ */

body {
    background: #f5f5f5;
    padding: 10px;
    height: 190vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.main-container {
    height: calc(100vh - 40px);
    background: white;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px;
}

.top-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    background: white;
}

.content-area {
    height: calc(100% - 75px);
    margin-top: 15px;
    overflow: hidden;
}

.left-col {
    min-width: 0;
    flex: 0 0 auto;
}

.right-col {
    min-width: 0;
    flex: 1 1 auto;
}

/* ============================================
   LEFT PANEL – ADAS FEATURES
   ============================================ */

.left-panel-wrapper {
    border: 2px solid #333;
    border-radius: 20px;
    background: white;
    padding: 0;
    max-height: 95vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.left-box {
    border: none;
    border-radius: 10px;
    background: transparent;
    overflow: hidden;
    height: 100%;
}

/* Sol panel arka planını dashboard ile aynı yap */
.adas-features-panel {
    background: radial-gradient(circle at top left,
            var(--color-secondary) 0,
            #121820 45%,
            var(--color-primary) 100%);
    border: 2px solid #333;
    border-radius: 15px;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.adas-header {
    padding: 15px 20px;
    background: var(--secondary-blue-gray);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.adas-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0;
    color: var(--text-primary-light);
}

.adas-accordion-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Bootstrap’in beyaz zeminini tamamen kapat */
.adas-features-panel .accordion {
    background: transparent !important;
    border: none !important;
}

.adas-features-panel .accordion-item {
    background: transparent !important;
    border: none !important;
    margin-bottom: 6px;
}

.adas-features-panel .accordion-header {
    background: transparent !important;
}

/* Accordion butonları – yarı saydam koyu ton, dashboard ile uyumlu */
.adas-features-panel .accordion-button {
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-primary-light) !important;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 8px 12px;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
    backdrop-filter: blur(4px);
}

.adas-features-panel .accordion-button:not(.collapsed) {
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

.adas-features-panel .accordion-button:focus {
    box-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.adas-features-panel .accordion-button::after {
    filter: invert(1);
}

/* Accordion içi de beyaz olmasın */
.adas-features-panel .accordion-body {
    background: transparent !important;
    padding: 5px 0;
}

.adas-features-panel .accordion-collapse {
    background: transparent !important;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.09);
}

.feature-item.active {
    background: var(--accent-blue);
}

.feature-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-content {
    flex: 1;
}

.feature-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary-light);
    margin-bottom: 3px;
}

.feature-description {
    font-size: 9px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.adas-accordion-container::-webkit-scrollbar,
.accordion-body::-webkit-scrollbar {
    width: 8px;
}

.adas-accordion-container::-webkit-scrollbar-track,
.accordion-body::-webkit-scrollbar-track {
    background: rgba(26, 29, 32, 0.3);
    border-radius: 4px;
}

.adas-accordion-container::-webkit-scrollbar-thumb,
.accordion-body::-webkit-scrollbar-thumb {
    background: var(--secondary-blue-gray);
    border-radius: 4px;
}

/* ============================================
   RIGHT PANEL – EV DASHBOARD
   ============================================ */

.right-panel {
    min-height: calc(95vh - 100px);
    border: 2px solid var(--color-secondary);
    border-radius: 20px;
    padding: 14px;
    background: radial-gradient(circle at top left,
            var(--color-secondary) 0,
            #121820 45%,
            var(--color-primary) 100%);
    color: var(--text-primary-light);
    display: flex;
    flex-direction: column;
}

/* Dashboard Layout */

.ev-dashboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ev-dashboard-header {
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ev-brand {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-primary-light);
}

.ev-location {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.ev-status-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(63, 169, 245, 0.18);
    border: 1px solid var(--color-accent-blue);
    color: #D4ECFF;
}

.ev-connection {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Cards */

.ev-card {
    background: linear-gradient(135deg,
            rgba(27, 36, 48, 0.96),
            rgba(10, 14, 22, 0.98));
    border-radius: 16px;
    padding: 12px 12px 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ev-card-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Speed Card */

.ev-card-speed {
    position: relative;
    overflow: hidden;
}

.ev-card-speed::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 10% -10%,
            rgba(63, 169, 245, 0.28),
            transparent 55%);
    opacity: 0.7;
    pointer-events: none;
}

.ev-speed-wrapper {
    position: relative;
    text-align: center;
    margin-top: 10px;
}

.ev-speed-value {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ev-speed-unit {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: -4px;
}

.ev-mode-pill {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

/* Energy Card */

.ev-battery-pill {
    font-size: 10px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--color-accent-blue);
    background: rgba(63, 169, 245, 0.16);
    color: #D7EAFF;
}

.ev-battery-main {
    min-width: 64px;
    text-align: center;
}

.ev-battery-percent {
    font-size: 22px;
    font-weight: 700;
}

.ev-battery-label {
    font-size: 10px;
    color: var(--text-secondary);
}

.ev-battery-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.ev-battery-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg,
            var(--color-accent-green),
            var(--color-accent-blue));
}

/* Chips */

.ev-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 9px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-secondary);
}

.ev-chip.active {
    background: rgba(63, 169, 245, 0.22);
    border-color: var(--color-accent-blue);
    color: #E4F2FF;
}

/* Trip Card */

.ev-trip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin-top: 6px;
}

.ev-trip-item {
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
}

.ev-trip-pill {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ev-label {
    font-size: 10px;
    color: var(--text-secondary);
}

.ev-value,
.ev-value-lg {
    font-weight: 600;
}

.ev-value-lg {
    font-size: 14px;
}

/* Climate Card */

.ev-temp-main {
    min-width: 72px;
    text-align: center;
}

.ev-temp-value {
    font-size: 26px;
    font-weight: 700;
}

.ev-temp-label {
    font-size: 10px;
    color: var(--text-secondary);
}

.ev-climate-pill {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(63, 169, 245, 0.16);
    border: 1px solid var(--color-accent-blue);
}

.ev-btn-toggle {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary-light);
    font-size: 10px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.ev-btn-toggle.active {
    background: rgba(63, 169, 245, 0.25);
    border-color: var(--color-accent-blue);
}

/* Bottom Nav */

.ev-bottom-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 6px;
    padding-bottom: 2px;
}

.ev-bottom-item {
    background: transparent;
    border: none;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    gap: 3px;
}

.ev-bottom-item:focus {
    outline: none;
}

.ev-bottom-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.ev-bottom-item.active .ev-bottom-dot {
    background: var(--color-accent-blue);
    border-color: var(--color-accent-blue);
}

.ev-bottom-label {
    font-size: 10px;
    color: var(--text-secondary);
}

.ev-bottom-item.active .ev-bottom-label {
    color: #E0F0FF;
}

/* ============================================
   TELL-TALE BAR
   ============================================ */

.ev-telltale-bar {
    height: 48px;
    /* SABİT YÜKSEKLİK EKLENDİ */
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 8px;
    display: flex;
    /* ALANIN SABİT KALMASI İÇİN */
    align-items: center;
    overflow: hidden;
}

.ev-telltale-track {
    height: 100%;
    /* DIŞ YÜKSEKLİĞİNE UYDU */
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
    /* SCROLLBAR GÖRÜNMESİN */
}

.ev-telltale-track::-webkit-scrollbar {
    display: none;
}

.ev-telltale-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 9px;
    white-space: nowrap;
    opacity: 0.65;
}

.ev-telltale-item .ev-telltale-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    box-shadow: 0 0 7px rgba(0, 0, 0, 0.8);
}

.ev-telltale-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Durum renkleri */

.ev-telltale-item.danger .ev-telltale-dot {
    background: var(--color-danger);
}

.ev-telltale-item.warning .ev-telltale-dot {
    background: var(--color-warning);
}

.ev-telltale-item.info .ev-telltale-dot {
    background: var(--color-accent-green);
}

.ev-telltale-item.muted .ev-telltale-dot {
    background: #8e8e93;
}

.ev-telltale-item.danger {
    border-color: rgba(255, 59, 59, 0.6);
}

.ev-telltale-item.warning {
    border-color: rgba(255, 180, 73, 0.6);
}

.ev-telltale-item.info {
    border-color: rgba(91, 229, 149, 0.6);
}

.ev-telltale-item.active {
    opacity: 1;
}

/* SVG ikon boyutu + arka plan */
.ev-telltale-icon {
    background: rgba(255, 255, 255, 0.07);
    padding: 8px;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    object-fit: contain;
    color: white;
    transition: all 0.3s ease;
}

/* Urgency-based background colors */
.ev-telltale-icon.urgency-WarningHigh,
.ev-telltale-icon.urgency-warningHigh {
    background: var(--urgency-warning-high) !important;
}

.ev-telltale-icon.urgency-WarningMiddle {
    background: var(--urgency-warning-middle) !important;
}

.ev-telltale-icon.urgency-WarningLow,
.ev-telltale-icon.urgency-warningLow {
    background: var(--urgency-warning-low) !important;
}

.ev-telltale-icon.urgency-Caution {
    background: var(--urgency-caution) !important;
}

.ev-telltale-icon.urgency-Notification {
    background: var(--urgency-notification) !important;
}

.ev-telltale-icon.urgency-Feedback {
    background: var(--urgency-feedback) !important;
}

/* SVG styling */
.ev-telltale-icon svg {
    width: 100%;
    height: 100%;
    color: white;
}



/* ============================================
   RESPONSIVE
   ============================================ */

/* Mobile First – global / left + right panel */
@media (max-width: 576px) {
    body {
        padding: 5px;
    }

    .top-header {
        font-size: 14px;
        height: 50px;
    }

    .adas-title {
        font-size: 14px;
    }

    .adas-features-panel .accordion-button {
        font-size: 8px;
        padding: 5px 8px;
    }

    .feature-name {
        font-size: 9px;
    }

    .feature-description {
        font-size: 7px;
    }

    .left-panel-wrapper {
        max-height: 60vh;
        margin-bottom: 15px;
    }

    .right-panel {
        min-height: 30vh;
        padding: 10px;
    }

    .content-area {
        height: auto;
    }

    .ev-card {
        padding: 10px 10px 9px;
    }

    .ev-speed-value {
        font-size: 36px;
    }

    .ev-temp-value {
        font-size: 22px;
    }

    .ev-trip-grid {
        gap: 8px;
    }

    .ev-telltale-bar {
        padding: 4px 6px;
    }

    .ev-telltale-item {
        padding-inline: 6px;
        font-size: 8px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .left-panel-wrapper {
        max-height: 70vh;
    }

    .adas-features-panel .accordion-button {
        font-size: 9px;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .left-panel-wrapper {
        max-height: 85vh;
    }
}

@media (min-width: 993px) {
    .left-panel-wrapper {
        max-height: 95vh;
    }
}

/* Urgency-based Blink Animations */

/* WarningHigh: 500ms blink (fast) */
@keyframes blink-warning-high {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.ev-telltale-icon.urgency-WarningHigh,
.ev-telltale-icon.urgency-warningHigh {
    animation: blink-warning-high 1000ms infinite;
    /* 500ms fade out + 500ms fade in = 1000ms total */
}

/* WarningMiddle: 1000ms blink (medium) */
@keyframes blink-warning-middle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.ev-telltale-icon.urgency-WarningMiddle {
    animation: blink-warning-middle 2000ms infinite;
    /* 1000ms fade out + 1000ms fade in = 2000ms total */
}

/* WarningLow: 2000ms blink (slow) */
@keyframes blink-warning-low {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.ev-telltale-icon.urgency-WarningLow,
.ev-telltale-icon.urgency-warningLow {
    animation: blink-warning-low 4000ms infinite;
    /* 2000ms fade out + 2000ms fade in = 4000ms total */
}

/* Caution: 3000ms blink (very slow) */
@keyframes blink-caution {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.ev-telltale-icon.urgency-Caution {
    animation: blink-caution 6000ms infinite;
    /* 3000ms fade out + 3000ms fade in = 6000ms total */
}

/* Notification: 4000ms fade in, then stay visible */
@keyframes fade-in-notification {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.ev-telltale-icon.urgency-Notification {
    animation: fade-in-notification 4000ms ease-in forwards;
    /* Fade in over 4000ms, then stay at opacity: 1 */
}

/* Feedback: 4000ms fade in, then stay visible */
@keyframes fade-in-feedback {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.ev-telltale-icon.urgency-Feedback {
    animation: fade-in-feedback 4000ms ease-in forwards;
    /* Fade in over 4000ms, then stay at opacity: 1 */
}

/* ============================================
   DASHBOARD MESSAGE DISPLAY
   ============================================ */

.ev-message-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    min-height: 40px;
    max-height: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ev-message-body {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: white;
    line-height: 1.4;
}

.ev-message-body:empty::before {
    content: 'No active warnings';
    opacity: 0.5;
    font-style: italic;
}

/* Telltale icon clickable effect */
.ev-telltale-icon {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ev-telltale-icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.ev-telltale-icon:active {
    transform: scale(0.95);
}