/* Weather Alerts System - Styling */

/* ========================================
   1. ALERT BUTTON
   ======================================== */

.alert-btn {
    position: fixed;
    bottom: 270px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    color: #000;
    font-size: 1.5em;
}

.alert-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

.alert-btn:active {
    transform: scale(0.95);
}

/* ========================================
   2. ALERT BADGE (Pulsing Indicator)
   ======================================== */

.alert-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #F44336;
    border: 2px solid #fff;
    animation: alertPulse 1.5s ease-in-out infinite;
}

.alert-badge.hidden {
    display: none;
}

@keyframes alertPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* ========================================
   3. ALERT MODAL
   ======================================== */

.alert-modal {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert Modal Content */
.alert-modal-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px 30px;
}

/* Custom scrollbar for alert modal */
.alert-modal-content::-webkit-scrollbar {
    width: 8px;
}

.alert-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.alert-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.alert-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ========================================
   4. ALERT GRID (Responsive)
   ======================================== */

.alert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 10px 0;
}

/* Responsive Grid Breakpoints */
@media (max-width: 768px) {
    .alert-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1200px) {
    .alert-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   5. ALERT ITEM CARD
   ======================================== */

.alert-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    transition: all 0.3s ease;
}

.alert-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Triggered Alert Item */
.alert-item-triggered {
    border: 2px solid #F44336;
    background: rgba(244, 67, 54, 0.1);
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.3);
}

/* Alert Item Header */
.alert-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.alert-item-header i {
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.alert-item-label {
    flex-grow: 1;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    text-align: left;
}

/* Alert Item Body */
.alert-item-body {
    margin-top: 10px;
}

/* ========================================
   6. CHECKBOX (Green Tick / Red Cross)
   ======================================== */

.alert-checkbox {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    flex-shrink: 0;
}

.alert-checkbox[data-enabled="true"] {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.6);
    color: #4CAF50;
}

.alert-checkbox[data-enabled="true"]:hover {
    background: rgba(76, 175, 80, 0.5);
    transform: scale(1.05);
}

.alert-checkbox[data-enabled="false"] {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.6);
    color: #F44336;
}

.alert-checkbox[data-enabled="false"]:hover {
    background: rgba(244, 67, 54, 0.5);
    transform: scale(1.05);
}

.alert-checkbox i {
    pointer-events: none;
}

/* ========================================
   7. SLIDER (Custom HTML5 Range Input)
   ======================================== */

.slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    margin: 10px 0;
}

/* Webkit (Chrome, Safari, Edge) */
.alert-slider::-webkit-slider-track {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
}

.alert-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4FACFE;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.6);
    transition: all 0.2s ease;
}

.alert-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.8);
}

.alert-slider::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

/* Firefox */
.alert-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

.alert-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4FACFE;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.6);
    transition: all 0.2s ease;
}

.alert-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.8);
}

.alert-slider::-moz-range-thumb:active {
    transform: scale(1.05);
}

/* ========================================
   8. SLIDER VALUE DISPLAY
   ======================================== */

.slider-value {
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.value-display {
    font-size: 1.3em;
    color: #4FACFE;
}

.value-unit {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   9. MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 480px) {
    .alert-modal {
        width: 95%;
        max-height: 90vh;
    }

    .alert-modal-content {
        padding: 15px 20px;
        max-height: 70vh;
    }

    .alert-item {
        padding: 15px;
    }

    .alert-item-label {
        font-size: 0.95em;
    }

    .alert-checkbox {
        width: 28px;
        height: 28px;
        font-size: 0.9em;
    }

    .slider-value {
        font-size: 1em;
    }

    .value-display {
        font-size: 1.1em;
    }
}

/* ========================================
   10. ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Smooth transitions for all interactive elements */
.alert-btn,
.alert-checkbox,
.alert-slider,
.alert-item {
    will-change: transform;
}
