/* motor/css/style.css - STILURI PENTRU ANSAMBLU MOTOR (exact ca Pedale) */

/* ========== CONTAINER PRINCIPAL - EXACT CA LA PEDALE ========== */
.motor-main-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(30, 40, 50, 0.95);
    border-radius: 16px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid #4ECDC4;
    overflow: hidden;
    position: relative;
}

/* ========== TITLU ANSAMBLU MOTOR - EXACT CA LA PEDALE ========== */
.motor-panel-title {
    background: linear-gradient(90deg, #1a5f7a, #2a8fb5);
    color: white;
    padding: 16px 20px;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(78, 205, 196, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.motor-title-text {
    flex: 1;
    text-align: center;
    font-family: inherit;
}

/* ========== CONTROALE CAMERĂ ========== */
.motor-camera-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.motor-camera-btn {
    padding: 6px 12px;
    background: rgba(20, 30, 40, 0.9);
    border: 1px solid #2a8fb5;
    border-radius: 4px;
    color: #4ECDC4;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.motor-camera-btn:hover {
    background: rgba(40, 60, 80, 0.9);
    border-color: #4ECDC4;
    color: #4ECDC4;
}

.motor-camera-btn.active {
    background: rgba(78, 205, 196, 0.2);
    border-color: #4ECDC4;
    color: #4ECDC4;
}

/* ========== GAUGE-URI SONAR FĂRĂ CARDURI ========== */
.motor-gauges-direct-container {
    padding: 15px;
    background: rgba(20, 30, 40, 0.8);
}

.motor-gauges-direct-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
}

.motor-gauges-direct-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
}

.motor-gauge-direct-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.motor-gauge-direct-item .motor-gauge-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    cursor: default;
}

.motor-gauge-direct-item .motor-gauge-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(20, 30, 40, 0.9);
    border: 3px solid;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    display: block;
}

.motor-gauge-direct-item .motor-gauge-value {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 6px;
    border-radius: 3px;
    min-width: 35px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: inherit;
}

.motor-gauge-direct-item .motor-gauge-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #4ECDC4;
    text-align: center;
    min-height: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: inherit;
}

/* Culori specifice pentru fiecare tip de gauge fără card */
.motor-gauge-direct-item[data-type="tilt"] .motor-gauge-canvas {
    border-color: #4ECDC4;
    box-shadow: 
        0 4px 12px rgba(78, 205, 196, 0.3),
        inset 0 0 20px rgba(78, 205, 196, 0.1);
}
.motor-gauge-direct-item[data-type="tilt"] .motor-gauge-label {
    color: #4ECDC4;
}

.motor-gauge-direct-item[data-type="sonda"] .motor-gauge-canvas {
    border-color: #FF6B6B;
    box-shadow: 
        0 4px 12px rgba(255, 107, 107, 0.3),
        inset 0 0 20px rgba(255, 107, 107, 0.1);
}
.motor-gauge-direct-item[data-type="sonda"] .motor-gauge-label {
    color: #FF6B6B;
}

.motor-gauge-direct-item[data-type="pozitieAx"] .motor-gauge-canvas {
    border-color: #FFD93D;
    box-shadow: 
        0 4px 12px rgba(255, 217, 61, 0.3),
        inset 0 0 20px rgba(255, 217, 61, 0.1);
}
.motor-gauge-direct-item[data-type="pozitieAx"] .motor-gauge-label {
    color: #FFD93D;
}

.motor-gauge-direct-item[data-type="pozitieSonda"] .motor-gauge-canvas {
    border-color: #4a9eff;
    box-shadow: 
        0 4px 12px rgba(74, 158, 255, 0.3),
        inset 0 0 20px rgba(74, 158, 255, 0.1);
}
.motor-gauge-direct-item[data-type="pozitieSonda"] .motor-gauge-label {
    color: #4a9eff;
}

/* ========== VIZUALIZARE 3D SONAR - EXACT CA LA PEDALE ========== */
.motor-sonar-display-section {
    padding: 15px;
    background: rgba(20, 30, 40, 0.8);
    position: relative;
}

.motor-sonar-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid #2a3a4a;
    background: linear-gradient(180deg, #0a2a3a 0%, #123445 100%);
}

#sonar3dCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========== INDICATORI UNGHIURI - ÎN STIL PEDALE ========== */
.motor-sonar-wrapper .motor-angle-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 15px;
    background: rgba(20, 30, 40, 0.85);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(78, 205, 196, 0.3);
    backdrop-filter: blur(10px);
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.motor-sonar-wrapper .motor-angle-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
}

.motor-sonar-wrapper .motor-angle-indicator span:first-child {
    color: #4a9eff;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.motor-sonar-wrapper .motor-angle-value {
    color: #00ff00;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 12px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(78, 205, 196, 0.2);
    min-width: 40px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* ========== CONTROALE MANUALE (SLIDERE) - ÎN STIL PEDALE ========== */
.motor-slider-controls {
    background: rgba(20, 30, 40, 0.9);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(78, 205, 196, 0.3);
    margin: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Indicatorii deasupra slide-urilor */
.motor-slider-controls .motor-angle-indicators {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(78, 205, 196, 0.2);
    margin-bottom: 20px;
}

.motor-slider-controls .motor-angle-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.motor-slider-controls .motor-angle-indicator span:first-child {
    color: #4a9eff;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.motor-slider-controls .motor-angle-value {
    color: #4ECDC4;
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: bold;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid rgba(78, 205, 196, 0.3);
    min-width: 45px;
    text-align: center;
    text-shadow: 0 0 8px rgba(78, 205, 196, 0.3);
}

.motor-slider-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.motor-slider-group:last-child {
    margin-bottom: 0;
}

.motor-slider-group label {
    font-size: 13px;
    font-weight: 600;
    color: #4ECDC4;
    text-align: center;
    padding-right: 0;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.motor-slider-group-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.motor-slider-group input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #1a3a5f, #2a8fb5);
    border-radius: 4px;
    outline: none;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.motor-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #4ECDC4;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 
        0 0 5px rgba(78, 205, 196, 0.8),
        0 0 15px rgba(78, 205, 196, 0.4);
    transition: all 0.2s ease;
}

.motor-slider-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #00ffea;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(78, 205, 196, 1);
}

.motor-slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #4ECDC4;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 
        0 0 5px rgba(78, 205, 196, 0.8),
        0 0 15px rgba(78, 205, 196, 0.4);
}

.motor-slider-group span {
    min-width: 40px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #FFD93D;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 217, 61, 0.3);
    text-shadow: 0 0 8px rgba(255, 217, 61, 0.3);
}

/* ========== LOADING - EXACT CA LA PEDALE ========== */
.motor-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4ECDC4;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    padding: 15px 25px;
    border-radius: 10px;
    border: 1px solid #4ECDC4;
    z-index: 10;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    min-width: 200px;
    font-family: inherit;
}

/* Stiluri pentru butoanele de mod */
.motor-camera-btn.active-mode {
    background: rgba(78, 205, 196, 0.3);
    border-color: #4ECDC4;
    color: #4ECDC4;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
    font-weight: bold;
}

.motor-camera-btn.simulare-mode {
    background: rgba(74, 158, 255, 0.2);
    border-color: #4a9eff;
    color: #4a9eff;
}

.motor-camera-btn.live-mode {
    background: rgba(255, 107, 107, 0.2);
    border-color: #FF6B6B;
    color: #FF6B6B;
}

.motor-camera-btn.settings-mode {
    background: rgba(255, 217, 61, 0.2);
    border-color: #FFD93D;
    color: #FFD93D;
}

.motor-camera-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}







.motor-loading::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    margin: 10px auto 0;
    border: 3px solid rgba(78, 205, 196, 0.3);
    border-top-color: #4ECDC4;
    border-radius: 50%;
    animation: motor-spin 1s linear infinite;
}

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

/* ========== RESPONSIVE - MODIFICAT PENTRU GAUGE-URI PE MOBIL ========== */
@media (max-width: 768px) {
    body.motor-body {
        padding: 15px 10px;
    }
    
    .motor-main-container {
        max-width: 100%;
        border-radius: 14px;
    }
    
    .motor-panel-title {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 12px 15px;
        font-size: 1.1rem;
    }
    
    .motor-sonar-wrapper {
        height: 280px;
    }
    
    /* MODIFICARE PENTRU 2 GAUGE-URI PE RÂND PE MOBIL */
    .motor-gauges-direct-layout {
        padding: 15px;
        gap: 20px;
    }
    
    .motor-gauges-direct-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        width: 100%;
        justify-items: center;
    }
    
    .motor-gauge-direct-item {
        min-width: unset;
        width: 100%;
        max-width: 140px;
    }
    
    /* DIMENSIUNI PENTRU MOBILE - gauge-uri fără card */
    .motor-gauge-direct-item .motor-gauge-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .motor-gauge-direct-item .motor-gauge-canvas {
        border-width: 2px !important;
    }
    
    .motor-gauge-direct-item .motor-gauge-value {
        left: 30%;
        font-size: 8px !important;
        min-width: 30px !important;
        padding: 2px 4px !important;
    }
    
    .motor-gauge-direct-item .motor-gauge-label {
        font-size: 0.6rem !important;
    }
    
    /* GRID PENTRU STATUS PE MOBIL */
    .motor-status-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* RESTUL STILURILOR RESPONSIVE */
    .motor-slider-controls {
        margin: 10px;
        padding: 15px;
    }
    
    .motor-slider-controls .motor-angle-indicators {
        flex-direction: row;
        padding: 10px;
        gap: 10px;
    }
    
    .motor-slider-controls .motor-angle-value {
        font-size: 12px;
        min-width: 35px;
        padding: 4px 8px;
    }
    
    .motor-camera-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body.motor-body {
        padding: 10px 5px;
    }
    
    .motor-main-container {
        border-radius: 12px;
    }
    
    .motor-sonar-wrapper {
        height: 240px;
    }
    
    /* MODIFICARE PENTRU TELEFOANE */
    .motor-gauges-direct-layout {
        padding: 12px;
        gap: 15px;
    }
    
    .motor-gauges-direct-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* DIMENSIUNI PENTRU TELEFOANE - gauge-uri fără card */
    .motor-gauge-direct-item .motor-gauge-wrapper {
        width: 90px;
        height: 90px;
    }
    
    .motor-gauge-direct-item .motor-gauge-canvas {
        border-width: 1.5px !important;
    }
    
    .motor-gauge-direct-item .motor-gauge-value {
        left: 30%;
        font-size: 7px !important;
        min-width: 28px !important;
        padding: 1px 3px !important;
    }
    
    .motor-gauge-direct-item .motor-gauge-label {
        font-size: 0.55rem !important;
        letter-spacing: 0.2px;
    }
    
    /* GRID PENTRU STATUS PE TELEFOANE */
    .motor-status-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .motor-status-item {
        padding: 6px 10px;
    }
    
    .motor-status-label {
        font-size: 0.7rem;
    }
    
    .motor-status-value {
        font-size: 0.75rem;
        min-width: 50px;
    }
    
    /* RESTUL STILURILOR RESPONSIVE */
    .motor-slider-controls {
        padding: 12px;
        margin: 8px;
    }
    
    .motor-slider-group {
        padding: 12px;
        gap: 10px;
    }
    
    .motor-slider-group input[type="range"] {
        height: 6px;
    }
    
    .motor-slider-group input[type="range"]::-webkit-slider-thumb {
        width: 16px;
        height: 16px;
    }
    
    .motor-slider-group span {
        font-size: 12px;
        min-width: 35px;
        padding: 5px 8px;
    }
    
    .motor-slider-controls .motor-angle-indicators {
        flex-direction: row;
        padding: 8px;
        gap: 8px;
    }
    
    .motor-slider-controls .motor-angle-indicator span:first-child {
        font-size: 10px;
    }
    
    .motor-slider-controls .motor-angle-value {
        font-size: 11px;
        min-width: 30px;
        padding: 3px 6px;
    }
    
    .motor-sonar-wrapper .motor-angle-indicators {
        gap: 10px;
        padding: 6px 12px;
        bottom: 8px;
    }
    
    .motor-sonar-wrapper .motor-angle-indicator span:first-child {
        font-size: 9px;
    }
    
    .motor-sonar-wrapper .motor-angle-value {
        font-size: 10px;
        min-width: 30px;
        padding: 3px 6px;
    }
}