/* ============================================
   FGC NOTIFICATION SYSTEM STYLES
   Professional notification UI components
   ============================================ */

/* ============================================
   NOTIFICATION BELL BUTTON
   ============================================ */

.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(40px, 5vmin, 56px);
    height: clamp(40px, 5vmin, 56px);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.05);
}

.notification-bell:active {
    transform: translateY(0) scale(0.98);
}

.notification-bell .bell-icon {
    font-size: clamp(18px, 2.5vmin, 24px);
    animation: bellRing 2s ease-in-out infinite;
}

@keyframes bellRing {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(10deg);
    }
    20%, 40% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

/* Badge counter */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #FF3B30;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    border: 2px solid #88BB0B;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

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

/* ============================================
   NOTIFICATION PANEL (Modal)
   ============================================ */

.notification-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-panel.open {
    opacity: 1;
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(135deg, #88BB0B 0%, #6A9308 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.notification-panel-header h3 {
    margin: 0;
    font-size: clamp(18px, 3vmin, 24px);
    font-weight: 700;
}

.notification-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notification-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.notification-panel-body {
    background: white;
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-panel.open .notification-panel-body {
    transform: scale(1);
}

/* Dark mode support */
body.dark-mode .notification-panel-body {
    background: #16213e;
    color: white;
}

/* ============================================
   NOTIFICATION STATUS SECTION
   ============================================ */

.notification-status {
    padding: 24px;
    border-bottom: 1px solid #E0E0E0;
}

body.dark-mode .notification-status {
    border-bottom-color: #2a2a3e;
}

.notification-permission-request {
    text-align: center;
}

.notification-permission-request p {
    margin: 0 0 16px 0;
    color: #424242;
    line-height: 1.5;
}

body.dark-mode .notification-permission-request p {
    color: #a0a0a0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #88BB0B 0%, #6A9308 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(136, 187, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(136, 187, 11, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 10px 20px;
    background: #F0F0F0;
    color: #1A1A1A;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
    width: 100%;
}

.btn-secondary:hover {
    background: #E8E8E8;
    border-color: #D0D0D0;
}

body.dark-mode .btn-secondary {
    background: #2a2a3e;
    color: white;
    border-color: #3a3a5e;
}

body.dark-mode .btn-secondary:hover {
    background: #3a3a5e;
}

.notification-enabled-status {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #E8F5E9;
    border-radius: 8px;
    color: #2E7D32;
    font-weight: 500;
}

.status-indicator.success {
    background: #E8F5E9;
    color: #2E7D32;
}

body.dark-mode .status-indicator.success {
    background: rgba(46, 125, 50, 0.2);
    color: #81C784;
}

.status-icon {
    font-size: 20px;
}

.notification-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.notification-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #88BB0B;
}

.notification-toggle span {
    font-size: 15px;
    color: #424242;
}

body.dark-mode .notification-toggle span {
    color: #a0a0a0;
}

/* ============================================
   ACTIVE ALERTS SECTION
   ============================================ */

.active-alerts-section {
    padding: 24px;
    border-bottom: 1px solid #E0E0E0;
}

body.dark-mode .active-alerts-section {
    border-bottom-color: #2a2a3e;
}

.active-alerts-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
}

body.dark-mode .active-alerts-section h4 {
    color: white;
}

.active-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.no-alerts-message {
    text-align: center;
    color: #757575;
    font-size: 14px;
    padding: 24px;
    font-style: italic;
}

body.dark-mode .no-alerts-message {
    color: #808080;
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #F8F9FA;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.alert-item:hover {
    background: #F0F1F2;
    border-color: #D0D0D0;
}

body.dark-mode .alert-item {
    background: #1a2a3e;
    border-color: #2a3a5e;
}

body.dark-mode .alert-item:hover {
    background: #2a3a5e;
}

.alert-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.alert-line-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 24px;
    padding: 0 8px;
    background: #88BB0B;
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
}

.alert-destination {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    color: #1A1A1A;
}

body.dark-mode .alert-destination {
    color: white;
}

.alert-time {
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    color: #424242;
    font-weight: 500;
}

body.dark-mode .alert-time {
    color: #a0a0a0;
}

.alert-item-config {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-minutes {
    font-size: 12px;
    color: #757575;
    white-space: nowrap;
}

body.dark-mode .alert-minutes {
    color: #808080;
}

.alert-remove-btn {
    width: 28px;
    height: 28px;
    background: #FFEBEE;
    color: #D32F2F;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.alert-remove-btn:hover {
    background: #D32F2F;
    color: white;
    transform: scale(1.1);
}

body.dark-mode .alert-remove-btn {
    background: rgba(211, 47, 47, 0.2);
    color: #EF5350;
}

body.dark-mode .alert-remove-btn:hover {
    background: #D32F2F;
    color: white;
}

/* ============================================
   NOTIFICATION HELP SECTION
   ============================================ */

.notification-help {
    padding: 24px;
    background: #F8F9FA;
    font-size: 14px;
    line-height: 1.6;
}

body.dark-mode .notification-help {
    background: #1a2a3e;
}

.notification-help p {
    margin: 0 0 12px 0;
    color: #1A1A1A;
}

body.dark-mode .notification-help p {
    color: white;
}

.notification-help ol {
    margin: 0;
    padding-left: 20px;
    color: #424242;
}

body.dark-mode .notification-help ol {
    color: #a0a0a0;
}

.notification-help li {
    margin-bottom: 8px;
}

/* ============================================
   NOTIFICATION CONTROL IN DEPARTURE ROWS
   ============================================ */

.notification-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 8px;
    background: #F0F0F0;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.notification-control:hover {
    opacity: 1;
    background: #E8E8E8;
    border-color: #88BB0B;
    transform: scale(1.1);
}

.notification-control.active {
    background: #88BB0B;
    border-color: #88BB0B;
    opacity: 1;
    animation: notificationActive 2s ease-in-out infinite;
}

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

body.dark-mode .notification-control {
    background: #2a2a3e;
    border-color: #3a3a5e;
}

body.dark-mode .notification-control:hover {
    background: #3a3a5e;
}

/* ============================================
   ALERT CONFIG POPUP
   ============================================ */

.alert-config-popup {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 16px;
    z-index: 10001;
    min-width: 200px;
    animation: popupSlideIn 0.2s ease;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.dark-mode .alert-config-popup {
    background: #16213e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E0E0E0;
    font-weight: 600;
    font-size: 14px;
    color: #1A1A1A;
}

body.dark-mode .popup-header {
    border-bottom-color: #2a2a3e;
    color: white;
}

.popup-close {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: #757575;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.popup-close:hover {
    color: #1A1A1A;
    transform: scale(1.2);
}

body.dark-mode .popup-close:hover {
    color: white;
}

.popup-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-option {
    padding: 10px 16px;
    background: #F8F9FA;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: #1A1A1A;
}

.time-option:hover {
    background: #E8F5E9;
    border-color: #88BB0B;
}

.time-option.active {
    background: #88BB0B;
    border-color: #88BB0B;
    color: white;
    font-weight: 600;
}

body.dark-mode .time-option {
    background: #1a2a3e;
    border-color: #2a3a5e;
    color: white;
}

body.dark-mode .time-option:hover {
    background: #2a3a5e;
}

body.dark-mode .time-option.active {
    background: #88BB0B;
    border-color: #88BB0B;
}

.remove-alert-btn {
    margin-top: 12px;
    padding: 10px;
    background: #FFEBEE;
    color: #D32F2F;
    border: 1px solid #FFCDD2;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.remove-alert-btn:hover {
    background: #D32F2F;
    color: white;
    border-color: #D32F2F;
}

body.dark-mode .remove-alert-btn {
    background: rgba(211, 47, 47, 0.2);
    border-color: rgba(211, 47, 47, 0.3);
}

body.dark-mode .remove-alert-btn:hover {
    background: #D32F2F;
    border-color: #D32F2F;
    color: white;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
    .notification-panel-body {
        width: 95vw;
        max-height: 90vh;
        border-radius: 12px;
    }

    .notification-panel-header {
        padding: 20px;
    }

    .notification-panel-header h3 {
        font-size: 18px;
    }

    .notification-status,
    .active-alerts-section,
    .notification-help {
        padding: 20px;
    }

    .alert-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .alert-item-info {
        width: 100%;
    }

    .alert-item-config {
        width: 100%;
        justify-content: space-between;
    }

    .alert-config-popup {
        left: 50% !important;
        transform: translateX(-50%);
        max-width: calc(100vw - 40px);
    }
}

@media (max-width: 480px) {
    .notification-bell {
        width: 40px;
        height: 40px;
    }

    .notification-bell .bell-icon {
        font-size: 18px;
    }

    .notification-badge {
        top: -4px;
        right: -4px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .notification-control {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

.alert-item {
    animation: slideUp 0.3s ease;
}
