/* ECU File Service Widget - Estilos */
:root {
    --neon-green: #00ff41;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --border: #333;
    --text: #ffffff;
    --text-dim: #999;
    --error: #ff4444;
}

/* Animaciones */
@keyframes pulse-strong {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.8);
        box-shadow: 0 0 5px var(--neon-green);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
        box-shadow: 
            0 0 20px var(--neon-green),
            0 0 40px var(--neon-green),
            0 0 60px var(--neon-green);
    }
}

@keyframes glow-text {
    0%, 100% {
        opacity: 0.6;
        text-shadow: 0 0 4px rgba(0, 255, 65, 0.4);
    }
    50% {
        opacity: 1;
        text-shadow: 
            0 0 8px rgba(0, 255, 65, 0.8),
            0 0 15px rgba(0, 255, 65, 0.6);
    }
}

/* Widget principal */
.ecu-widget {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    z-index: 1000;
}

/* Widget cerrado */
.widget-compact {
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border: 2px solid var(--neon-green);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    gap: 2px;
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(0, 255, 65, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.widget-compact:hover {
    transform: scale(1.08);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(0, 255, 65, 0.5);
}

.widget-compact.hide {
    display: none !important;
}

.compact-icon {
    width: 40px;
    height: 40px;
    color: var(--neon-green);
    filter: drop-shadow(0 0 8px rgba(0, 255, 65, 0.6));
    margin-bottom: 2px;
}

.compact-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1;
    text-align: center;
}

.compact-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 2px;
}

.compact-status.online {
    color: var(--neon-green);
    animation: glow-text 2s infinite ease-in-out;
}

.compact-status.offline {
    color: var(--error);
}

.status-ball {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-ball.online {
    background: var(--neon-green);
    animation: pulse-strong 2s infinite ease-in-out;
}

.status-ball.offline {
    background: var(--error);
}

/* Widget expandido */
.widget-expanded {
    width: 320px;
    background: var(--card-bg);
    border: 2px solid var(--neon-green);
    border-radius: 16px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(0, 255, 65, 0.2);
}

.widget-expanded.hide {
    display: none;
}

.expanded-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    width: 24px;
    height: 24px;
    color: var(--neon-green);
}

.header-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.close-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--error);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    transform: scale(1.05);
}

.expanded-body {
    padding: 18px 20px 20px;
}

.section {
    margin-bottom: 18px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.requests-box {
    background: #242424;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px;
    position: relative;
    min-height: 60px;
}

.request {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.request.active {
    opacity: 1;
}

.request-car {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.request-ecu {
    font-size: 12px;
    font-weight: 500;
    color: #00b4d8;
}

.request-time {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 10px;
    font-weight: 600;
    color: var(--neon-green);
    background: rgba(0, 255, 65, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.status-box {
    background: rgba(0, 255, 65, 0.08);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.status-box.offline {
    background: rgba(255, 68, 68, 0.08);
    border-color: rgba(255, 68, 68, 0.3);
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-dot.online {
    background: var(--neon-green);
    animation: pulse-strong 2s infinite ease-in-out;
}

.status-dot.offline {
    background: var(--error);
}

.status-label {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-label.online {
    color: var(--neon-green);
}

.status-label.offline {
    color: var(--error);
}

.status-desc {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.next-time {
    font-size: 10px;
    font-weight: 600;
    color: var(--neon-green);
    background: rgba(0, 255, 65, 0.15);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
}

.schedule-box {
    background: #242424;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.schedule-info {
    text-align: center;
    margin-bottom: 10px;
}

.timezone {
    font-size: 9px;
    color: var(--text-dim);
    background: rgba(0, 255, 65, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 12px;
}

.day-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.02);
}

.day-item.today {
    background: rgba(0, 255, 65, 0.15);
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: var(--neon-green);
    font-weight: 700;
}

.day-item.closed {
    opacity: 0.5;
}

.hide {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .ecu-widget {
        right: 20px;
    }
    
    .widget-compact {
        width: 70px;
        height: 70px;
    }
    
    .widget-expanded {
        width: 300px;
    }
}