/* ============================================================ */
/* Notification bell + dropdown — SHARED between the v1 editor   */
/* control bar (_EditorControlBar.cshtml) and the v2 editor      */
/* top bar (WebsiteEditorV2.cshtml). Driven by                   */
/* /wwwroot/js/components/notification-dropdown.js.              */
/* Extracted from editor-control-bar.css so both editors reuse   */
/* the exact same element instead of redesigning it.             */
/* ============================================================ */

/* Control bar icon buttons (notifications, etc.) */
.control-bar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--accent-color, #5d57f4) !important;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.control-bar-icon-btn:hover {
    background: rgba(93, 87, 244, 0.08);
}

.control-bar-icon-btn i {
    font-size: 20px;
    color: var(--accent-color, #5d57f4) !important;
}

/* Notification badge - red circle with count */
.control-bar-icon-btn .notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: white !important;
    background: #ef4444;
    border-radius: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ====================== */
/* Notification Dropdown */
/* ====================== */
.notification-dropdown-container {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    z-index: 10001;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notification-dropdown.show {
    display: flex;
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.notification-dropdown-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.notification-dropdown-header .btn-link {
    color: #6c757d !important;
    font-size: 18px;
    transition: color 0.2s;
}

.notification-dropdown-header .btn-link:hover {
    color: var(--accent-color, #5d57f4) !important;
}

/* Notification Tabs */
.notification-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
    padding: 0;
}

.notification-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.notification-tab i {
    font-size: 14px;
}

.notification-tab:hover {
    color: var(--accent-color, #5d57f4);
    background: rgba(93, 87, 244, 0.04);
}

.notification-tab.active {
    color: var(--accent-color, #5d57f4);
}

.notification-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: var(--accent-color, #5d57f4);
    border-radius: 2px 2px 0 0;
}

.notification-tab .tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 600;
    color: #fff !important;
    background: #ef4444;
    border-radius: 9px;
}

.notification-tab.active .tab-badge {
    background: var(--accent-color, #5d57f4);
}

.notification-dropdown-body {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

.notification-dropdown-footer {
    padding: 0;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    text-align: center;
    min-height: 0;
}

.notification-dropdown-footer:empty {
    display: none;
    border-top: none;
}

.notification-footer-btn,
.notification-footer-link {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: var(--accent-color, #5d57f4) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-footer-btn:hover,
.notification-footer-link:hover {
    background: #e9ecef;
    text-decoration: none;
}

.notification-footer-btn i,
.notification-footer-link i {
    margin-left: 6px;
}

.notification-see-all {
    color: var(--accent-color, #5d57f4) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.notification-see-all:hover {
    text-decoration: underline;
}

/* Notification Items */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f4ff;
}

.notification-item.unread:hover {
    background: #e8eeff;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.notification-icon.order {
    background: #e8f5e9;
    color: #2e7d32;
}

.notification-icon.contact {
    background: #e3f2fd;
    color: #1565c0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-description {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 11px;
    color: #adb5bd;
}

.notification-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color, #5d57f4);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

/* Empty state */
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.notification-empty i {
    font-size: 40px;
    color: #dee2e6;
    margin-bottom: 12px;
    display: block;
}

.notification-empty p {
    font-size: 13px;
    margin: 0;
}

/* Loading state */
.notification-loading {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.notification-loading i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.notification-loading .spin {
    animation: notification-spin 1s linear infinite;
}

@keyframes notification-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 576px) {
    .notification-dropdown {
        position: fixed;
        top: 60px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: calc(100vh - 80px);
    }

    .notification-tabs {
        padding: 0 4px;
    }

    .notification-tab {
        padding: 8px 6px;
        font-size: 11px;
    }

    .notification-tab i {
        font-size: 12px;
    }

    .notification-tab .tab-badge {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
    }
}
