/**
 * Broadcast Notifications Styles
 */

.broadcast-notifications {
    position: fixed;
    z-index: 1050;
    width: 380px;
    max-width: calc(100vw - 30px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Position variants */
.broadcast-notifications.position-top-right {
    top: 20px;
    right: 20px;
}

.broadcast-notifications.position-top-left {
    top: 20px;
    left: 20px;
}

.broadcast-notifications.position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.broadcast-notifications.position-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Header */
.broadcast-notifications .notifications-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #0B1F3B 0%, #14B8A6 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.broadcast-notifications .notifications-header h6 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.broadcast-notifications .notifications-header .btn-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 1rem;
    padding: 0;
    transition: color 0.2s ease;
}

.broadcast-notifications .notifications-header .btn-link:hover {
    color: white !important;
}

/* Notifications list */
.broadcast-notifications .notifications-list {
    max-height: 500px;
    overflow-y: auto;
    background: white;
}

/* Individual notification */
.broadcast-notifications .notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    cursor: pointer;
    position: relative;
}

.broadcast-notifications .notification-item:hover {
    background-color: #f8f9fa;
}

.broadcast-notifications .notification-item.unread {
    background-color: #f0f9ff;
    border-left: 3px solid #14B8A6;
}

.broadcast-notifications .notification-item.unread:hover {
    background-color: #e6f3fe;
}

.broadcast-notifications .notification-item.read {
    opacity: 0.8;
}

/* Notification icon */
.broadcast-notifications .notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(11, 31, 59, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.broadcast-notifications .notification-icon i {
    font-size: 1.3rem;
    color: #14B8A6;
}

/* Notification content */
.broadcast-notifications .notification-content {
    min-width: 0; /* For text truncation */
}

.broadcast-notifications .notification-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-right: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.broadcast-notifications .notification-message {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
    word-wrap: break-word;
}

/* Dismiss button */
.broadcast-notifications .dismiss-notification {
    width: 20px;
    height: 20px;
    padding: 0;
    font-size: 0.7rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.broadcast-notifications .dismiss-notification:hover {
    opacity: 1;
}

/* Time ago */
.broadcast-notifications .time-ago {
    font-size: 0.75rem;
    color: #999;
}

/* Action buttons */
.broadcast-notifications .btn-group .btn-link {
    color: #14B8A6;
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.broadcast-notifications .btn-group .btn-link:hover {
    opacity: 1;
    color: #0d9488;
}

/* Empty state */
.broadcast-notifications .empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    background: white;
}

.broadcast-notifications .empty-state i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ddd;
}

/* Unread badge */
#broadcast-unread-badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    background-color: #dc3545;
    color: white;
    transition: all 0.2s ease;
}

/* Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Animation classes */
.broadcast-notifications.animate-slide {
    animation: slideInRight 0.3s ease-out;
}

.broadcast-notifications.position-top-left.animate-slide {
    animation-name: slideInLeft;
}

.broadcast-notifications.position-bottom-right.animate-slide {
    animation-name: slideInUp;
}

.broadcast-notifications.position-bottom-left.animate-slide {
    animation-name: slideInLeft;
}

.broadcast-notifications.animate-fade {
    animation: fadeIn 0.3s ease-out;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .broadcast-notifications {
        width: 100%;
        max-width: 100%;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        border-radius: 12px 12px 0 0;
        animation-name: slideInUp !important;
    }
    
    .broadcast-notifications .notifications-list {
        max-height: 350px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .broadcast-notifications {
        background: #1a1a1a;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    
    .broadcast-notifications .notifications-list {
        background: #1a1a1a;
    }
    
    .broadcast-notifications .notification-item {
        border-bottom-color: #333;
    }
    
    .broadcast-notifications .notification-item:hover {
        background-color: #222;
    }
    
    .broadcast-notifications .notification-item.unread {
        background-color: #1a2a35;
    }
    
    .broadcast-notifications .notification-item.unread:hover {
        background-color: #1f3540;
    }
    
    .broadcast-notifications .notification-title {
        color: #eee;
    }
    
    .broadcast-notifications .notification-message {
        color: #ccc;
    }
    
    .broadcast-notifications .empty-state {
        background: #1a1a1a;
        color: #666;
    }
    
    .broadcast-notifications .empty-state i {
        color: #333;
    }
}
