/* =====================================================
   Island Alerts - Tourist-facing alert styles
   Used by: /alerts page, home banner, FAB
   ===================================================== */

/* -------------------------------------------------------
   Alert FAB (Floating Action Button - bottom-left)
   ------------------------------------------------------- */
.alert-fab {
    position: fixed;
    bottom: calc(75px + env(safe-area-inset-bottom, 0));
    left: 16px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.4);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.alert-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}
.alert-fab-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    background: #DC2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}
.alert-fab-pulse {
    animation: alertFabPulse 2s infinite;
}
@keyframes alertFabPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 4px 24px rgba(220, 38, 38, 0.6); }
}

/* -------------------------------------------------------
   Home Page Alert Banner
   ------------------------------------------------------- */
.iig-alerts-banner {
    background: #fef3c7;
    border-bottom: 2px solid #f59e0b;
}
.alerts-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.alerts-banner-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #92400e;
    transition: background 0.2s;
}
.alerts-banner-card:hover {
    background: rgba(245, 158, 11, 0.12);
}
.alerts-banner-card + .alerts-banner-card {
    border-top: 1px solid rgba(217, 119, 6, 0.2);
}
.alerts-banner-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}
.alerts-banner-icon.priority-critical {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}
.alerts-banner-text {
    flex: 1;
    min-width: 0;
}
.alerts-banner-title {
    font-weight: 600;
    font-size: 13px;
    color: #78350f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.alerts-banner-msg {
    font-size: 12px;
    color: #92400e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.alerts-banner-arrow {
    color: #b45309;
    font-size: 12px;
    flex-shrink: 0;
}
.alerts-banner-dismiss {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(120, 53, 15, 0.15);
    color: #92400e;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background 0.2s;
}
.alerts-banner-dismiss:hover {
    background: rgba(120, 53, 15, 0.25);
}
.alerts-banner-more {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #92400e;
    text-decoration: none;
    padding: 6px 0;
    font-weight: 600;
    border-top: 1px solid rgba(217, 119, 6, 0.2);
}
.alerts-banner-more:hover {
    text-decoration: underline;
    background: rgba(245, 158, 11, 0.08);
}

/* -------------------------------------------------------
   Alerts Page
   ------------------------------------------------------- */
.alerts-page {
    padding: 16px 0 48px;
    min-height: 60vh;
}
.alerts-header {
    text-align: center;
    margin-bottom: 20px;
}
.alerts-title {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}
.alerts-title i {
    color: #f59e0b;
    margin-right: 8px;
}
.alerts-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 4px 0 0;
}

/* Filter Tabs */
.alert-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.alert-filters::-webkit-scrollbar {
    display: none;
}
.alert-filter-tab {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.alert-filter-tab:hover {
    background: #e5e7eb;
}
.alert-filter-tab.active {
    background: var(--iig-primary, #0369a1);
    color: white;
}
.alert-filter-tab i {
    font-size: 12px;
}

/* Alert List */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.alerts-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}
.alerts-loading i {
    font-size: 24px;
    margin-right: 8px;
}

/* Alert Card */
.alert-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
    border-left: 4px solid #d1d5db;
}
.alert-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.alert-card.priority-critical {
    border-left-color: #dc2626;
}
.alert-card.priority-high {
    border-left-color: #f59e0b;
}
.alert-card.priority-normal {
    border-left-color: #3b82f6;
}
.alert-card.priority-low {
    border-left-color: #6b7280;
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}
.alert-content {
    flex: 1;
    min-width: 0;
}
.alert-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.alert-area {
    font-size: 11px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}
.alert-time {
    font-size: 11px;
    color: #9ca3af;
    margin-left: auto;
}
.alert-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px;
    line-height: 1.3;
}
.alert-message {
    font-size: 13px;
    color: #4b5563;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.alert-detail {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}
.alert-detail p {
    margin: 0 0 8px;
}
.alert-source {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}
.alert-source a {
    color: var(--iig-primary, #0369a1);
    text-decoration: none;
}
.alert-source a:hover {
    text-decoration: underline;
}
.alert-expand {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    align-self: center;
    font-size: 14px;
    flex-shrink: 0;
}
.alert-expand:hover {
    color: #6b7280;
}

/* Empty State */
.alerts-empty {
    text-align: center;
    padding: 60px 20px;
}
.alerts-empty-icon {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 16px;
}
.alerts-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px;
}
.alerts-empty p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Notification Settings Link */
.alerts-settings {
    margin-top: 24px;
}
.alerts-settings-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}
.alerts-settings-link:hover {
    background: #f3f4f6;
}
.alerts-settings-link i:first-child {
    color: var(--iig-primary, #0369a1);
}
.alerts-settings-link i:last-child {
    margin-left: auto;
    color: #9ca3af;
}

/* -------------------------------------------------------
   Responsive
   ------------------------------------------------------- */
@media (max-width: 480px) {
    .alert-fab {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .alert-card {
        padding: 12px;
        gap: 10px;
    }
    .alert-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .alert-title {
        font-size: 14px;
    }
}
