/* Weather Alerts Styles */

.weather-alerts-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.widget-header h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.alert-icon {
    font-size: 1.3rem;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

.view-all-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #6c757d;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.alert-item.alert-critical {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.alert-item.alert-high {
    border-left-color: #fd7e14;
    background: #fff8f0;
}

.alert-item.alert-medium {
    border-left-color: #ffc107;
    background: #fffef5;
}

.alert-item.alert-low {
    border-left-color: #17a2b8;
    background: #f0f9ff;
}

.alert-icon-badge {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: #212529;
}

.alert-message {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.alert-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #868e96;
}

.alert-time {
    font-weight: 500;
}

.alert-farm {
    color: #007bff;
}

.alert-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.mark-read-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.alerts-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.empty-message {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #495057;
}

.empty-submessage {
    font-size: 0.85rem;
    color: #868e96;
}

/* Full Alerts Page Styles */
.weather-alerts-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

.alerts-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

.alerts-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.critical .stat-value {
    color: #dc3545;
}

.stat-card.high .stat-value {
    color: #fd7e14;
}

.stat-card.total .stat-value {
    color: #007bff;
}

.alert-detail-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.alert-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.alert-detail-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.alert-detail-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #6c757d;
    flex-wrap: wrap;
}

.alert-detail-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 1.5rem;
}

.alert-detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.alert-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.alert-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.alert-notification-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-notification-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .weather-alerts-page {
        padding: 1rem;
    }

    .alerts-filters {
        flex-direction: column;
    }

    .alerts-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .alert-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .alert-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .alert-detail-header {
        flex-direction: column;
        gap: 1rem;
    }

    .alert-detail-actions {
        width: 100%;
    }

    .alert-detail-actions .btn {
        flex: 1;
    }
}

