/* LoRa Single Traffic Light Widget Styles - NARROW COMPACT VERSION */

.lora-single-widget {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin: 15px auto;
    max-width: 420px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.lora-single-title {
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 12px 0;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.lora-single-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Compact Traffic Light - Smaller */
.lora-single-traffic-light {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    border-radius: 15px;
    padding: 12px 10px;
    width: 70px;
    flex-shrink: 0;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.5),
        0 3px 8px rgba(0, 0, 0, 0.25);
}

/* Individual Lights - Smaller but still visible */
.lora-single-light {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0a0a0a;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    border: 2px solid #333;
}

/* Red Light */
.lora-single-light.red {
    background: radial-gradient(circle at 30% 30%, #4a0000, #1a0000);
}

.lora-single-light.red.active {
    background: radial-gradient(circle at 30% 30%, #ff4444, #cc0000);
    box-shadow:
        0 0 20px rgba(255, 0, 0, 0.9),
        0 0 40px rgba(255, 0, 0, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    border-color: #ff0000;
    animation: pulse-red 2s infinite;
}

/* Yellow Light */
.lora-single-light.yellow {
    background: radial-gradient(circle at 30% 30%, #4a4a00, #1a1a00);
}

.lora-single-light.yellow.active {
    background: radial-gradient(circle at 30% 30%, #ffff44, #cccc00);
    box-shadow:
        0 0 20px rgba(255, 255, 0, 0.9),
        0 0 40px rgba(255, 255, 0, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    border-color: #ffff00;
    animation: pulse-yellow 2s infinite;
}

/* Green Light */
.lora-single-light.green {
    background: radial-gradient(circle at 30% 30%, #004a00, #001a00);
}

.lora-single-light.green.active {
    background: radial-gradient(circle at 30% 30%, #44ff44, #00cc00);
    box-shadow:
        0 0 20px rgba(0, 255, 0, 0.9),
        0 0 40px rgba(0, 255, 0, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    border-color: #00ff00;
    animation: pulse-green 2s infinite;
}

/* Pulse Animations */
@keyframes pulse-red {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(255, 0, 0, 0.9),
            0 0 40px rgba(255, 0, 0, 0.5),
            inset 0 2px 5px rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 25px rgba(255, 0, 0, 1),
            0 0 50px rgba(255, 0, 0, 0.7),
            inset 0 2px 5px rgba(255, 255, 255, 0.5);
        transform: scale(1.03);
    }
}

@keyframes pulse-yellow {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(255, 255, 0, 0.9),
            0 0 40px rgba(255, 255, 0, 0.5),
            inset 0 2px 5px rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 25px rgba(255, 255, 0, 1),
            0 0 50px rgba(255, 255, 0, 0.7),
            inset 0 2px 5px rgba(255, 255, 255, 0.5);
        transform: scale(1.03);
    }
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(0, 255, 0, 0.9),
            0 0 40px rgba(0, 255, 0, 0.5),
            inset 0 2px 5px rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 25px rgba(0, 255, 0, 1),
            0 0 50px rgba(0, 255, 0, 0.7),
            inset 0 2px 5px rgba(255, 255, 255, 0.5);
        transform: scale(1.03);
    }
}

/* Info Section - Full size text */
.lora-single-info {
    flex: 1;
    min-width: 0; /* Allow text to wrap properly */
}

.lora-single-status-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 8px;
}

.lora-single-status-title.green {
    color: #00aa00;
}

.lora-single-status-title.yellow {
    color: #ccaa00;
}

.lora-single-status-title.red {
    color: #cc0000;
}

.lora-single-status-text {
    font-size: 15px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Sensor Values - Compact but readable */
.lora-single-values {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    border-left: 3px solid #4CAF50;
}

.lora-single-value {
    display: flex;
    align-items: center;
    margin: 6px 0;
    font-size: 15px;
}

.lora-single-icon {
    font-size: 18px;
    margin-right: 6px;
    flex-shrink: 0;
}

.lora-single-label {
    color: #666;
    margin-right: 6px;
    white-space: nowrap;
}

.lora-single-number {
    font-weight: bold;
    color: #333;
    margin-left: auto;
    white-space: nowrap;
}

.lora-single-timestamp {
    text-align: right;
    color: #999;
    font-size: 13px;
    font-style: italic;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 500px) {
    .lora-single-widget {
        max-width: 100%;
        padding: 12px;
    }
    
    .lora-single-container {
        flex-direction: column;
        gap: 12px;
    }

    .lora-single-traffic-light {
        width: 65px;
        padding: 10px 8px;
    }

    .lora-single-light {
        width: 45px;
        height: 45px;
    }

    .lora-single-info {
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .lora-single-widget {
        background: #1a1a1a;
        border-color: #444;
    }

    .lora-single-title {
        color: #ffffff;
        border-bottom-color: #444;
    }

    .lora-single-status-text {
        color: #ccc;
    }

    .lora-single-values {
        background: #2a2a2a;
        border-left-color: #4CAF50;
    }

    .lora-single-label {
        color: #aaa;
    }

    .lora-single-number {
        color: #fff;
    }

    .lora-single-timestamp {
        color: #777;
    }
}

/* Loading State */
.lora-single-widget.loading {
    opacity: 0.6;
    position: relative;
}

.lora-single-widget.loading::after {
    content: "Lade Daten...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}
