/**
 * Dashboard Styles - Vehicle dashboard, steering, pedals - Compact
 */

/* Vehicle Dashboard */
#vehicleDashboard {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    color: #fff;
    z-index: 100;
    overflow: hidden;
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: rgba(var(--color-primary-rgb), 0.2);
}

.dashboard-header h4 {
    margin: 0;
    color: var(--color-primary);
    font-size: 10px;
    text-transform: uppercase;
}

#dashboardContent {
    padding: 8px;
}

#vehicleDashboard.disabled #dashboardContent {
    display: none;
}

/* Control Mode Indicator */
.control-mode-indicator {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0.4;
    transition: all 0.3s ease;
    cursor: default;
}

.mode-badge.adas {
    background: rgba(33, 150, 243, 0.2);
    color: var(--color-info);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.mode-badge.manual {
    background: rgba(255, 152, 0, 0.2);
    color: var(--color-warning);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.mode-badge.active {
    opacity: 1;
    transform: scale(1.05);
}

.mode-badge.adas.active {
    background: rgba(33, 150, 243, 0.4);
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
}

.mode-badge.manual.active {
    background: rgba(255, 152, 0, 0.4);
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}

/* Driving Mode Selector */
.driving-mode-selector {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.driving-mode-btn {
    padding: 3px 6px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: 6px;
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    font-size: 9px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.driving-mode-btn:hover {
    opacity: 0.8;
    background: rgba(var(--color-primary-rgb), 0.2);
}

.driving-mode-btn.active {
    opacity: 1;
    background: rgba(var(--color-primary-rgb), 0.4);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
    transform: scale(1.05);
}

.dashboard-item {
    text-align: center;
    margin-bottom: 6px;
}

.dashboard-item span {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
}

/* Steering Wheel - Mini */
.steering-container {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

#steeringWheel {
    width: 45px;
    height: 45px;
    border: 3px solid #555;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, #333 30%, #222 100%);
}

.steering-indicator {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 15px;
    background: var(--color-primary);
    border-radius: 2px;
    transform-origin: center 19px;
}

/* ADAS Target Indicator */
.adas-target-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 8px 0;
    padding: 5px;
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 6px;
}

.adas-arrow {
    font-size: 14px;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.adas-arrow.left {
    color: var(--color-info);
}

.adas-arrow.right {
    color: var(--color-info);
}

.adas-arrow.active {
    opacity: 1;
    transform: scale(1.3);
    text-shadow: 0 0 8px currentColor;
}

.adas-target-label {
    font-size: 8px;
    color: var(--color-info);
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

/* Pedals - Compact */
.pedals-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 8px 0;
}

.pedal-bar {
    width: 25px;
    height: 40px;
    background: #222;
    border: 1px solid #444;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.pedal-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    transition: height 0.1s;
}

.pedal-fill.accel {
    background: linear-gradient(to top, #4CAF50, #8BC34A);
}

.pedal-fill.brake {
    background: linear-gradient(to top, #f44336, #E91E63);
}

/* Wheels - Mini */
.wheels-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-top: 6px;
}

.wheel-pair {
    display: flex;
    gap: 25px;
}

.wheel {
    width: 15px;
    height: 28px;
    background: #333;
    border: 2px solid #555;
    border-radius: 3px;
    position: relative;
}

.wheel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 2px;
    background: #666;
}

.wheel.turning-left {
    transform: rotate(-15deg);
    border-color: var(--color-primary);
}

.wheel.turning-right {
    transform: rotate(15deg);
    border-color: var(--color-primary);
}

/* BSM (Blind Spot Monitoring) Indicator */
.bsm-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 6px 0;
    padding: 5px 4px;
    background: rgba(255, 152, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    position: relative;
}

.bsm-zone {
    width: 18px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.15;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.bsm-icon {
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bsm-zone.warning {
    opacity: 1;
    background: rgba(255, 152, 0, 0.25);
    border-color: rgba(255, 152, 0, 0.6);
    animation: bsm-pulse-warn 1s ease-in-out infinite;
}

.bsm-zone.warning .bsm-icon {
    opacity: 1;
    color: var(--color-warning);
}

.bsm-zone.danger {
    opacity: 1;
    background: rgba(244, 67, 54, 0.35);
    border-color: rgba(244, 67, 54, 0.8);
    animation: bsm-pulse-danger 0.5s ease-in-out infinite;
}

.bsm-zone.danger .bsm-icon {
    opacity: 1;
    color: #f44336;
}

.bsm-car-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

/* Rear indicator - below car icon */
.bsm-rear {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 10px;
    border-radius: 0 0 4px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.15;
    transition: all 0.2s ease;
}

.bsm-rear-icon {
    font-size: 7px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bsm-rear.warning {
    opacity: 1;
    background: rgba(255, 152, 0, 0.25);
    animation: bsm-pulse-warn 1s ease-in-out infinite;
}

.bsm-rear.warning .bsm-rear-icon {
    opacity: 1;
    color: var(--color-warning);
}

.bsm-rear.danger {
    opacity: 1;
    background: rgba(244, 67, 54, 0.35);
    animation: bsm-pulse-danger 0.5s ease-in-out infinite;
}

.bsm-rear.danger .bsm-rear-icon {
    opacity: 1;
    color: #f44336;
}

@keyframes bsm-pulse-warn {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(255, 152, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 10px rgba(255, 152, 0, 0.6);
    }
}

@keyframes bsm-pulse-danger {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(244, 67, 54, 0.4);
    }

    50% {
        box-shadow: 0 0 12px rgba(244, 67, 54, 0.8);
    }
}

/* Analog Gauges */
.gauges-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gauge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.gauge-item canvas {
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
}

.gauge-item span {
    font-size: 8px;
    color: #888;
    text-transform: uppercase;
}