/* Alert Panel CSS - Notification Panel for Weather Alerts */

.alert-panel {
    position: fixed;
    top: 130px;  /* Position just under the navbar (header height + margin + padding) */
    right: -400px;
    width: 310px;
    max-height: calc(100vh - 140px);  /* Allow panel to fit in remaining viewport height */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.9) 100%);
    border: 2px solid rgba(22, 66, 60, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.alert-panel.show {
    right: 20px;
}

.alert-panel-header {
    background: linear-gradient(135deg, 
        rgba(106, 156, 137, 0.1) 0%, 
        rgba(106, 156, 137, 0.05) 100%);
    border-bottom: 2px solid rgba(22, 66, 60, 0.1);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.alert-panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(106, 156, 137, 0.1), 
        transparent);
    animation: headerShimmer 3s infinite;
}

@keyframes headerShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.alert-panel-title {
    color: rgba(22, 66, 60, 1);
    font-size: 1.2em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.alert-panel-title i {
    color: rgba(106, 156, 137, 1);
    font-size: 1.1em;
    padding: 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, 
        rgba(106, 156, 137, 0.15) 0%, 
        rgba(106, 156, 137, 0.08) 100%);
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.alert-close-btn {
    background: none;
    border: none;
    color: rgba(108, 117, 125, 0.7);
    font-size: 1.5em;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

.alert-close-btn:hover {
    background: rgba(108, 117, 125, 0.1);
    color: rgba(108, 117, 125, 1);
    transform: rotate(90deg);
}

.alert-panel-content {
    max-height: calc(100vh - 220px);  /* Adjust for header + panel header + margins */
    overflow-y: auto;
    padding: 0;
}

.alert-panel-content::-webkit-scrollbar {
    width: 6px;
}

.alert-panel-content::-webkit-scrollbar-track {
    background: rgba(106, 156, 137, 0.1);
    border-radius: 3px;
}

.alert-panel-content::-webkit-scrollbar-thumb {
    background: rgba(106, 156, 137, 0.3);
    border-radius: 3px;
}

.alert-panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 156, 137, 0.5);
}

.alert-item {
    padding: 20px;
    border-bottom: 1px solid rgba(22, 66, 60, 0.08);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-item:hover {
    background: linear-gradient(135deg, 
        rgba(106, 156, 137, 0.08) 0%, 
        rgba(106, 156, 137, 0.03) 100%);
    transform: translateX(5px);
}

.alert-item.severe {
    border-left: 4px solid #dc3545;
    background: linear-gradient(135deg, 
        rgba(220, 53, 69, 0.05) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
}

.alert-item.warning {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.05) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
}

.alert-item.watch {
    border-left: 4px solid #17a2b8;
    background: linear-gradient(135deg, 
        rgba(23, 162, 184, 0.05) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
}

.alert-item.advisory {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, 
        rgba(40, 167, 69, 0.05) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.alert-type {
    color: rgba(22, 66, 60, 1);
    font-weight: 700;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-time {
    color: rgba(108, 117, 125, 0.8);
    font-size: 0.85em;
    font-weight: 500;
}

.alert-message {
    color: rgba(22, 66, 60, 0.9);
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.alert-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(108, 117, 125, 0.8);
    font-size: 0.9em;
    margin-bottom: 12px;
}

.alert-location i {
    color: rgba(106, 156, 137, 1);
}

.alert-severity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-severity.severe {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-severity.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.alert-severity.watch {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.2);
}

.alert-severity.advisory {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.alert-empty {
    text-align: center;
    padding: 40px 30px;
    color: rgba(108, 117, 125, 0.8);
}

.alert-empty i {
    font-size: 3em;
    color: rgba(106, 156, 137, 0.6);
    margin-bottom: 15px;
    animation: gentlePulse 3s infinite;
}

@keyframes gentlePulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.alert-empty h3 {
    color: rgba(22, 66, 60, 1);
    margin-bottom: 8px;
    font-size: 1.2em;
}

.alert-empty p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.4;
}

.alert-empty .setting-button {
    margin-top: 20px;
    background: linear-gradient(135deg, 
        rgba(106, 156, 137, 0.9) 0%, 
        rgba(106, 156, 137, 1) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 5px 15px rgba(106, 156, 137, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 250px;
    width: auto;
    min-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.alert-empty .setting-button i {
    font-size: 1.7em;
    flex-shrink: 0;
    margin-top: 14px;
}

.alert-empty .setting-button:hover {
    background: linear-gradient(135deg, 
        rgba(106, 156, 137, 1) 0%, 
        rgba(91, 141, 122, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(106, 156, 137, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.alert-empty .setting-button:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .alert-panel {
        top: 100px;  /* Adjust for smaller header on mobile */
        width: 320px;
        right: -340px;
        max-height: calc(100vh - 120px);
    }
    
    .alert-panel.show {
        right: 10px;
    }
    
    .alert-panel-content {
        max-height: calc(100vh - 200px);
    }
    
    .alert-panel-header {
        padding: 15px;
    }
    
    .alert-panel-title {
        font-size: 1.1em;
    }
    
    .alert-item {
        padding: 15px;
    }
    
    .alert-message {
        font-size: 0.9em;
    }
    
    .alert-empty .setting-button {
        max-width: 220px;
        font-size: 0.9em;
        padding: 10px 16px;
        min-width: 160px;
    }
    
    .alert-empty .setting-button i {
        font-size: 0.75em;
    }
}

/* Dark Mode Support */
body[style*="rgba(17, 34, 29, 0.7)"] .alert-panel {
    background: linear-gradient(135deg, rgba(17, 34, 29, 0.95), rgba(22, 66, 60, 0.9));
    border-color: rgba(233, 239, 236, 0.3);
    color: rgb(233, 239, 236);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-panel-header {
    background: linear-gradient(135deg, rgba(22, 66, 60, 0.3), rgba(17, 34, 29, 0.6));
    border-bottom-color: rgba(233, 239, 236, 0.2);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-panel-title {
    color: rgb(233, 239, 236);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-close-btn {
    color: rgba(233, 239, 236, 0.7);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-close-btn:hover {
    background: rgba(233, 239, 236, 0.1);
    color: rgb(233, 239, 236);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-item {
    border-bottom-color: rgba(233, 239, 236, 0.1);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-item:hover {
    background: linear-gradient(135deg, rgba(106, 156, 137, 0.15), rgba(106, 156, 137, 0.08));
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-type {
    color: rgb(233, 239, 236);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-message {
    color: rgba(233, 239, 236, 0.9);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-time,
body[style*="rgba(17, 34, 29, 0.7)"] .alert-location {
    color: rgba(233, 239, 236, 0.7);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-empty {
    color: rgba(233, 239, 236, 0.8);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-empty h3 {
    color: rgb(233, 239, 236);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-empty .setting-button {
    background: linear-gradient(135deg, 
        rgba(106, 156, 137, 1) 0%, 
        rgba(91, 141, 122, 1) 100%);
    color: rgb(233, 239, 236);
}

body[style*="rgba(17, 34, 29, 0.7)"] .alert-empty .setting-button:hover {
    background: linear-gradient(135deg, 
        rgba(91, 141, 122, 1) 0%, 
        rgba(76, 126, 107, 1) 100%);
}
