/**
 * Notifications Module Styles
 *
 * @package IncuCommunity
 * @since 1.0.0
 */

/* ========================================
   Bell Component
   ======================================== */

.incuc-notifications-bell {
    position: relative;
    display: inline-flex;
}

.incuc-bell-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--incuc-text-color, #374151);
    cursor: pointer;
    transition: all 0.2s ease;
}

.incuc-bell-trigger:hover {
    background: var(--incuc-bg-hover, #f3f4f6);
    color: var(--incuc-primary-color, #3b82f6);
}

.incuc-bell-trigger i {
    font-size: 24px;
}

.incuc-bell-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--incuc-danger-color, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

/* Dropdown */
.incuc-bell-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    width: 360px;
    max-width: 90vw;
    margin-top: 8px;
    border-radius: 12px;
    background: var(--incuc-bg-color, #fff);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.incuc-bell-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--incuc-border-color, #e5e7eb);
}

.incuc-bell-dropdown-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--incuc-heading-color, #111827);
}

.incuc-bell-mark-read {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--incuc-text-muted, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
}

.incuc-bell-mark-read:hover {
    background: var(--incuc-bg-hover, #f3f4f6);
    color: var(--incuc-primary-color, #3b82f6);
}

.incuc-bell-dropdown-list {
    max-height: 400px;
    overflow-y: auto;
}

.incuc-bell-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: var(--incuc-text-muted, #6b7280);
}

.incuc-bell-dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--incuc-border-color, #e5e7eb);
    text-align: center;
}

.incuc-bell-view-all {
    color: var(--incuc-primary-color, #3b82f6);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.incuc-bell-view-all:hover {
    color: var(--incuc-primary-hover, #2563eb);
    text-decoration: underline;
}

/* ========================================
   Notification Item
   ======================================== */

.incuc-notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--incuc-border-color, #e5e7eb);
    background: var(--incuc-bg-color, #fff);
    text-decoration: none;
    transition: background 0.2s ease;
}

.incuc-notification-item:hover {
    background: var(--incuc-bg-hover, #f9fafb);
}

.incuc-notification-item.unread {
    background: var(--incuc-bg-unread, #eff6ff);
}

.incuc-notification-item.unread:hover {
    background: var(--incuc-bg-unread-hover, #dbeafe);
}

.incuc-notification-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--notification-color, #3b82f6);
    color: #fff;
    font-size: 16px;
}

.incuc-notification-avatar {
    flex-shrink: 0;
    position: relative;
}

.incuc-notification-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.incuc-notification-avatar .incuc-notification-type-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--incuc-bg-color, #fff);
    background: var(--notification-color, #3b82f6);
    color: #fff;
    font-size: 10px;
}

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

.incuc-notification-text {
    margin: 0 0 4px;
    color: var(--incuc-text-color, #374151);
    font-size: 14px;
    line-height: 1.4;
}

.incuc-notification-text strong {
    color: var(--incuc-heading-color, #111827);
    font-weight: 600;
}

.incuc-notification-time {
    color: var(--incuc-text-muted, #6b7280);
    font-size: 12px;
}

.incuc-notification-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.incuc-notification-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--incuc-text-muted, #6b7280);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

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

.incuc-notification-delete:hover {
    background: var(--incuc-danger-bg, #fef2f2);
    color: var(--incuc-danger-color, #ef4444);
}

/* Unread indicator */
.incuc-notification-unread-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--incuc-primary-color, #3b82f6);
}

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

.incuc-notifications-page {
    max-width: 800px;
    margin: 0 auto;
}

.incuc-notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--incuc-border-color, #e5e7eb);
}

.incuc-notifications-title {
    margin: 0;
    color: var(--incuc-heading-color, #111827);
    font-size: 24px;
    font-weight: 700;
}

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

.incuc-notifications-mark-all {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--incuc-primary-color, #3b82f6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.incuc-notifications-mark-all:hover {
    background: var(--incuc-bg-hover, #f3f4f6);
}

.incuc-notifications-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--incuc-text-muted, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
}

.incuc-notifications-settings-btn:hover {
    background: var(--incuc-bg-hover, #f3f4f6);
    color: var(--incuc-text-color, #374151);
}

/* Filters */
.incuc-notifications-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.incuc-notifications-filter {
    padding: 8px 16px;
    border: 1px solid var(--incuc-border-color, #e5e7eb);
    border-radius: 20px;
    background: transparent;
    color: var(--incuc-text-color, #374151);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.incuc-notifications-filter:hover {
    background: var(--incuc-bg-hover, #f3f4f6);
}

.incuc-notifications-filter.active {
    background: var(--incuc-primary-color, #3b82f6);
    border-color: var(--incuc-primary-color, #3b82f6);
    color: #fff;
}

/* List */
.incuc-notifications-list {
    border-radius: 12px;
    background: var(--incuc-bg-color, #fff);
    border: 1px solid var(--incuc-border-color, #e5e7eb);
    overflow: hidden;
}

.incuc-notifications-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--incuc-text-muted, #6b7280);
}

/* Empty state */
.incuc-notifications-empty {
    padding: 60px 20px;
    text-align: center;
}

.incuc-notifications-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--incuc-bg-hover, #f3f4f6);
}

.incuc-notifications-empty-icon i {
    font-size: 36px;
    color: var(--incuc-text-muted, #6b7280);
}

.incuc-notifications-empty p {
    margin: 0;
    color: var(--incuc-text-muted, #6b7280);
    font-size: 16px;
}

/* Pagination */
.incuc-notifications-pagination {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.incuc-notifications-load-more {
    padding: 12px 24px;
    border: 1px solid var(--incuc-border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--incuc-bg-color, #fff);
    color: var(--incuc-text-color, #374151);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.incuc-notifications-load-more:hover {
    background: var(--incuc-bg-hover, #f3f4f6);
    border-color: var(--incuc-primary-color, #3b82f6);
    color: var(--incuc-primary-color, #3b82f6);
}

/* ========================================
   Settings Modal
   ======================================== */

.incuc-notifications-settings-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.incuc-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.incuc-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    margin: 20px;
    border-radius: 16px;
    background: var(--incuc-bg-color, #fff);
    overflow: hidden;
}

.incuc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--incuc-border-color, #e5e7eb);
}

.incuc-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--incuc-heading-color, #111827);
}

.incuc-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--incuc-text-muted, #6b7280);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.incuc-modal-close:hover {
    background: var(--incuc-bg-hover, #f3f4f6);
    color: var(--incuc-text-color, #374151);
}

.incuc-modal-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.incuc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--incuc-border-color, #e5e7eb);
}

/* Settings */
.incuc-settings-section h4 {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--incuc-heading-color, #111827);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.incuc-toggle-setting {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--incuc-border-color, #e5e7eb);
    cursor: pointer;
}

.incuc-toggle-setting:last-child {
    border-bottom: none;
}

.incuc-toggle-setting input[type="checkbox"] {
    width: 44px;
    height: 24px;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 12px;
    background: var(--incuc-border-color, #d1d5db);
    cursor: pointer;
    transition: background 0.2s ease;
}

.incuc-toggle-setting input[type="checkbox"]:checked {
    background: var(--incuc-primary-color, #3b82f6);
}

.incuc-toggle-setting input[type="checkbox"]::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    margin: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.incuc-toggle-setting input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.incuc-toggle-setting span {
    color: var(--incuc-text-color, #374151);
    font-size: 14px;
}

/* ========================================
   Spinner
   ======================================== */

.incuc-spinner,
.incuc-spinner-sm {
    display: inline-block;
    border: 3px solid var(--incuc-border-color, #e5e7eb);
    border-top-color: var(--incuc-primary-color, #3b82f6);
    border-radius: 50%;
    animation: incuc-spin 0.8s linear infinite;
}

.incuc-spinner {
    width: 32px;
    height: 32px;
}

.incuc-spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

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

/* ========================================
   Toast Notifications
   ======================================== */

.incuc-notification-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--incuc-bg-color, #fff);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.incuc-notification-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.incuc-notification-toast.success {
    border-left: 4px solid var(--incuc-success-color, #22c55e);
}

.incuc-notification-toast.error {
    border-left: 4px solid var(--incuc-danger-color, #ef4444);
}

.incuc-notification-toast.info {
    border-left: 4px solid var(--incuc-primary-color, #3b82f6);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 640px) {
    .incuc-bell-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 70vh;
    }

    .incuc-notifications-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .incuc-notifications-filters {
        flex-wrap: wrap;
    }

    .incuc-modal-content {
        max-height: 80vh;
        margin: 0;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
}

/* ========================================
   Preview Notice
   ======================================== */

.incuc-preview-notice {
    padding: 20px;
    border-radius: 8px;
    background: var(--incuc-bg-hover, #f3f4f6);
    color: var(--incuc-text-muted, #6b7280);
    text-align: center;
    font-size: 14px;
}
