/* Notification Bell Component Styles */
/* Matches site-selector.css design pattern */

/* Bell container */
.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Bell toggle button - default state (no notifications) */
.notification-bell-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.notification-bell-toggle:hover {
    background: var(--glass-white-5);
    color: var(--text-secondary);
}

.notification-bell-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(113, 44, 249, 0.3);
}

/* Bell toggle with notifications - CTA green style */
.notification-bell-toggle.has-notifications {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.notification-bell-toggle.has-notifications:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.notification-bell-toggle.has-notifications:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.4), 0 2px 8px rgba(34, 197, 94, 0.3);
}

.notification-bell-toggle.has-notifications:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(34, 197, 94, 0.3);
}

/* Bell icon */
.notification-bell-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Badge for unread count */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: var(--color-danger);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    box-shadow: var(--shadow-sm);
}

/* Dropdown container */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.15s ease;
    z-index: var(--z-dropdown);
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown header */
.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notification-dropdown-title {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0;
}

.notification-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-mark-all-read {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--text-xs);
    color: var(--brand-primary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.1s ease;
}

.notification-mark-all-read:hover {
    background: var(--glass-white-5);
}

.notification-mark-all-read:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(113, 44, 249, 0.3);
}

/* Settings button */
.notification-settings-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.1s ease;
}

.notification-settings-btn:hover {
    background: var(--glass-white-5);
    color: var(--text-primary);
}

.notification-settings-btn.active {
    background: rgba(113, 44, 249, 0.1);
    color: var(--brand-primary);
}

.notification-settings-icon {
    width: 16px;
    height: 16px;
}

/* Settings panel */
.notification-settings-panel {
    display: none;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.notification-settings-panel.show {
    display: block;
}

.notification-settings-item {
    margin-bottom: 12px;
}

.notification-settings-item:last-of-type {
    margin-bottom: 0;
}

.notification-settings-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

/* Toggle switch */
.notification-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.notification-toggle-slider {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    background-color: var(--bg-surface-raised);
    border-radius: 20px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.notification-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.notification-toggle:checked + .notification-toggle-slider {
    background-color: var(--brand-primary);
}

.notification-toggle:checked + .notification-toggle-slider::after {
    transform: translateX(16px);
}

.notification-toggle:focus + .notification-toggle-slider {
    box-shadow: 0 0 0 2px rgba(113, 44, 249, 0.3);
}

.notification-settings-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.notification-settings-link {
    font-size: var(--text-sm);
    color: var(--brand-primary);
    text-decoration: none;
}

.notification-settings-link:hover {
    text-decoration: underline;
}

/* Dropdown content area */
.notification-dropdown-content {
    max-height: 400px;
    overflow-y: auto;
}

/* Loading state */
.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.notification-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: notification-spin 0.8s linear infinite;
}

@keyframes notification-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.notification-empty {
    padding: 32px 16px;
    text-align: center;
}

.notification-empty p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Notification item */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.1s ease;
}

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

.notification-item:hover {
    background: var(--glass-white-5);
}

.notification-item.unread {
    background: rgba(113, 44, 249, 0.1);
}

.notification-item.unread:hover {
    background: rgba(113, 44, 249, 0.15);
}

/* Notification item icon */
.notification-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-raised);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.notification-item-icon svg {
    width: 16px;
    height: 16px;
}

/* Notification item content */
.notification-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.notification-item-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

.notification-item-message {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

/* Unread indicator dot */
.notification-item-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background-color: var(--brand-primary);
    border-radius: 50%;
    margin-top: 6px;
}

/* Dropdown footer */
.notification-dropdown-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notification-view-all {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--brand-primary);
    text-decoration: none;
    transition: all 0.1s ease;
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
    .notification-dropdown {
        width: calc(100vw - 16px);
        right: -8px;
    }

    .notification-dropdown-content {
        max-height: 300px;
    }
}

/* ==========================================================================
   Notifications Page Styles
   ========================================================================== */

/* Page header with actions */
.notifications-page-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.notifications-actions {
    display: flex;
    gap: 8px;
}

/* Notifications list (full page) */
.notification-list {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Notification list item (larger than dropdown item) */
.notification-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: transparent;
    cursor: pointer;
    transition: background 0.1s ease;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

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

.notification-list-item:hover {
    background: var(--glass-white-5);
}

.notification-list-item.unread {
    background: rgba(113, 44, 249, 0.1);
}

.notification-list-item.unread:hover {
    background: rgba(113, 44, 249, 0.15);
}

/* List item icon */
.notification-list-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-raised);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.notification-list-item-icon svg {
    width: 20px;
    height: 20px;
}

/* List item content */
.notification-list-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.notification-list-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.notification-list-item-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-list-item-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.notification-list-item-message {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.notification-list-item-action {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--brand-primary);
    text-decoration: none;
    margin-top: 4px;
}

.notification-list-item-action:hover {
    text-decoration: underline;
}

/* List item unread dot */
.notification-list-item-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    background-color: var(--brand-primary);
    border-radius: 50%;
    margin-top: 6px;
}

/* List item delete button */
.notification-list-item-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.1s ease;
}

.notification-list-item:hover .notification-list-item-delete {
    opacity: 1;
}

.notification-list-item-delete:hover {
    background: rgba(249, 44, 92, 0.1);
    color: var(--color-danger);
}

/* Empty state for page */
.notification-empty-page {
    padding: 64px 24px;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.notification-empty-page svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.notification-empty-page p {
    margin: 0;
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.notification-empty-subtext {
    font-size: var(--text-sm);
    margin-top: 8px;
    color: var(--text-muted);
}
