/**
 * Frontend styles for Notification Manager
 */

/* Notification Container */
#nm-notification-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    pointer-events: none;
 /*   max-width: 350px;  */
 /*   min-width: 300px;  */
}

/* Default position (top-right) */
#nm-notification-container {
    top: 20px;
    right: 20px;
}

/* Base Notification Styles */
.nm-notification {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
    pointer-events: auto;
/*       max-width: 350px;  */
/*       min-width: 300px;  */
    transition: all 0.3s ease;
    animation: nm-fade-in 0.3s ease-out;
}

.nm-notification.nm-hiding {
    animation: nm-fade-out 0.3s ease-in;
}

/* Notification Structure */
.nm-notification {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
}

.nm-notification .nm-icon {
    font-size: 20px;
    min-width: 24px;
    line-height: 1;
    margin-top: 2px;
}

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

.nm-notification .nm-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 4px;
    color: inherit;
}

.nm-notification .nm-message {
    font-size: 13px;
    line-height: 1.4;
    color: inherit;
    opacity: 0.9;
}

.nm-notification .nm-dismiss {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    min-width: 18px;
}

.nm-notification .nm-dismiss:hover {
    opacity: 1;
}

/* Notification Types */
.nm-notification.nm-type-info {
    background: #e3f2fd;
    border-left: none;
    color: #0d47a1;
}

.nm-notification.nm-type-info .nm-icon {
    color: #2196f3;
}

.nm-notification.nm-type-success {
    background: #e8f5e8;
    border-left: none;
    color: #2e7d32;
}

.nm-notification.nm-type-success .nm-icon {
    color: #4caf50;
}

.nm-notification.nm-type-warning {
    background: #fff8e1;
    border-left: none;
    color: #e65100;
}

.nm-notification.nm-type-warning .nm-icon {
    color: #ff9800;
}

.nm-notification.nm-type-error {
    background: #ffebee;
    border-left: none;
    color: #c62828;
}

.nm-notification.nm-type-error .nm-icon {
    color: #f44336;
}

.nm-notification.nm-type-announcement {
    background: #f3e5f5;
    border-left: none;
    color: #4a148c;
}

.nm-notification.nm-type-announcement .nm-icon {
    color: #9c27b0;
}

/* Notification Styles */

/* Default: Full styled appearance with rounded corners and shadow */
.nm-notification.nm-style-default {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Minimal: Clean look without decorative elements */
.nm-notification.nm-style-minimal {
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* None: Basic functional CSS only (no visual styling) */
.nm-notification.nm-style-none {
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: transparent !important;
    padding: 0;
}

/* Container Position Classes */
#nm-notification-container.nm-position-top_left {
    top: 20px;
    left: 20px;
    right: auto;
    bottom: auto;
    transform: none;
    display: flex;
    flex-direction: column;
}

#nm-notification-container.nm-position-top_center {
    top: 20px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
}

#nm-notification-container.nm-position-top_right {
    top: 20px;
    right: 20px;
    left: auto;
    bottom: auto;
    transform: none;
    display: flex;
    flex-direction: column;
}

#nm-notification-container.nm-position-bottom_left {
    bottom: 20px;
    left: 20px;
    top: auto;
    right: auto;
    transform: none;
    display: flex;
    flex-direction: column-reverse;
}

#nm-notification-container.nm-position-bottom_center {
    bottom: 20px;
    left: 50%;
    top: auto;
    right: auto;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
}

#nm-notification-container.nm-position-bottom_right {
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    flex-direction: column-reverse;
}

#nm-notification-container.nm-position-center {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Shortcode Notifications */
.nm-notification-shortcode {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin: 16px 0;
    border-radius: 6px;
    position: relative;
}

.nm-notification-shortcode .nm-icon {
    font-size: 18px;
    min-width: 20px;
}

.nm-notification-shortcode .nm-content {
    flex: 1;
}

.nm-notification-shortcode .nm-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.nm-notification-shortcode .nm-message {
    line-height: 1.5;
}

.nm-notification-shortcode .nm-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
}

.nm-notification-shortcode .nm-dismiss:hover {
    opacity: 1;
}

/* Banner Notifications */
.nm-notification-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    position: relative;
}

.nm-notification-banner.nm-full-width {
    width: 100%;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.nm-notification-banner.nm-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.nm-notification-banner.nm-banner-top {
    border-bottom: 2px solid;
}

.nm-notification-banner.nm-banner-bottom {
    border-top: 2px solid;
}

.nm-notification-banner .nm-content {
    flex: 1;
    text-align: center;
}

.nm-notification-banner .nm-title {
    font-weight: 600;
    margin-right: 8px;
    display: inline;
}

.nm-notification-banner .nm-message {
    display: inline;
}

/* Popup Notifications */
.nm-notification-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: auto;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup Position Variants */
.nm-notification-popup.nm-position-center {
    align-items: center;
    justify-content: center;
}

.nm-notification-popup.nm-position-top_left {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
}

.nm-notification-popup.nm-position-top_center {
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.nm-notification-popup.nm-position-top_right {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
}

.nm-notification-popup.nm-position-bottom_left {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
}

.nm-notification-popup.nm-position-bottom_center {
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}

.nm-notification-popup.nm-position-bottom_right {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
}

.nm-notification-popup .nm-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.nm-notification-popup .nm-popup-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px 24px 24px;
    animation: nm-popup-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.nm-notification-popup .nm-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nm-notification-popup .nm-popup-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

.nm-notification-popup .nm-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.nm-notification-popup .nm-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #2c3e50;
    line-height: 1.3;
}

.nm-notification-popup .nm-message {
    line-height: 1.6;
    color: #5a6c7d;
    font-size: 15px;
}

/* Add top margin to message when there's no title (prevents overlap with close button) */
.nm-notification-popup .nm-popup-content > .nm-message:first-of-type {
    margin-top: 20px;
}

.nm-popup-cta {
    display: inline-block;
    margin-top: 16px;
    background: #6E47E6;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.nm-popup-cta:hover {
    background: #1EE883;
    color: #6E47E6;
}

/* Type-specific popup styles */
.nm-notification-popup.nm-type-info .nm-popup-content {
    border-top: none;
}

.nm-notification-popup.nm-type-info .nm-icon {
    color: #007cba;
}

.nm-notification-popup.nm-type-success .nm-popup-content {
    border-top: none;
}

.nm-notification-popup.nm-type-success .nm-icon {
    color: #46b450;
}

.nm-notification-popup.nm-type-warning .nm-popup-content {
    border-top: none;
}

.nm-notification-popup.nm-type-warning .nm-icon {
    color: #ffb900;
}

.nm-notification-popup.nm-type-error .nm-popup-content {
    border-top: none;
}

.nm-notification-popup.nm-type-error .nm-icon {
    color: #dc3232;
}

.nm-notification-popup.nm-type-announcement .nm-popup-content {
    border-top: none;
}

.nm-notification-popup.nm-type-announcement .nm-icon {
    color: #9c27b0;
}

/* Style variants for popup notifications */

/* Default style: Full styled appearance (already has default styling) */
.nm-notification-popup.nm-style-default .nm-popup-content {
    /* Uses existing default styles */
}

/* Minimal style: Removes decorative elements, keeps functionality */
.nm-notification-popup.nm-style-minimal .nm-popup-content {
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-top: none;
}

.nm-notification-popup.nm-style-minimal .nm-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.nm-notification-popup.nm-style-minimal .nm-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.nm-notification-popup.nm-style-minimal .nm-message {
    font-size: 14px;
}

/* None style: Only functional positioning, no visual styling */
.nm-notification-popup.nm-style-none .nm-popup-content {
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #ccc;
    background: white;
    padding: 20px;
}

.nm-notification-popup.nm-style-none .nm-icon {
    display: none;
}

.nm-notification-popup.nm-style-none .nm-title {
    font-size: 16px;
    font-weight: normal;
    color: inherit;
    margin-bottom: 8px;
}

.nm-notification-popup.nm-style-none .nm-message {
    font-size: 14px;
    color: inherit;
    line-height: 1.5;
}

.nm-notification-popup.nm-style-none .nm-popup-close {
    background: transparent;
    width: 24px;
    height: 24px;
    color: #666;
}

.nm-notification-popup.nm-style-none .nm-popup-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

/* Popup Navigation Styles */
.nm-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.nm-popup-slide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: auto;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nm-popup-nav-header {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}

.nm-popup-counter {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Ensure content doesn't overlap with counter in multi-popup navigation */
.nm-popup-slide .nm-popup-content {
    padding-top: 65px !important;
}

/* If there's a title, reduce the padding since title provides spacing */
.nm-popup-slide .nm-popup-content .nm-title {
    margin-top: 0;
}

.nm-popup-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.nm-popup-prev,
.nm-popup-next,
.nm-popup-close-all {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 90px;
}

.nm-popup-prev:hover,
.nm-popup-next:hover,
.nm-popup-close-all:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.nm-popup-prev-placeholder {
    min-width: 90px;
    height: 38px;
}

.nm-popup-close-all {
    background: #dc3232;
}

.nm-popup-close-all:hover {
    background: #b32d2e;
}

/* Popup responsive styles */
@media (max-width: 768px) {
    .nm-notification-popup .nm-popup-content {
        width: 95vw;
        max-width: none;
        padding: 24px 20px 20px;
        margin: 20px;
    }
    
    .nm-notification-popup .nm-icon {
        font-size: 40px;
        margin-bottom: 16px;
    }
    
    .nm-notification-popup .nm-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .nm-notification-popup .nm-message {
        font-size: 14px;
    }
    
    .nm-popup-navigation {
        margin-top: 15px;
        gap: 8px;
    }
    
    .nm-popup-prev,
    .nm-popup-next,
    .nm-popup-close-all {
        padding: 8px 15px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .nm-popup-prev-placeholder {
        min-width: 70px;
        height: 34px;
    }
    
    .nm-popup-counter {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* List Notifications */
.nm-notification-list {
    margin: 20px 0;
}

.nm-notification-item {
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
}

.nm-notification-item .nm-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.nm-notification-item .nm-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 8px;
}

.nm-notification-item .nm-item-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.nm-notification-item .nm-excerpt {
    color: #666;
    line-height: 1.5;
}

/* No Notifications Message */
.nm-no-notifications {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Animations */
@keyframes nm-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes nm-popup-in {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes nm-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes nm-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #nm-notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .nm-notification {
        max-width: none;
        min-width: auto;
    }
    
    .nm-notification-banner {
        padding: 10px 16px;
    }
    
    .nm-notification-popup .nm-popup-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .nm-notification {
        padding: 12px;
        gap: 8px;
    }
    
    .nm-notification .nm-title {
        font-size: 13px;
    }
    
    .nm-notification .nm-message {
        font-size: 12px;
    }
    
    .nm-notification-banner {
        padding: 8px 12px;
    }
    
    .nm-notification-banner .nm-content {
        text-align: left;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .nm-notification {
        border: 2px solid;
    }
    
    .nm-notification.nm-type-info {
        border-color: #1976d2;
    }
    
    .nm-notification.nm-type-success {
        border-color: #388e3c;
    }
    
    .nm-notification.nm-type-warning {
        border-color: #f57c00;
    }
    
    .nm-notification.nm-type-error {
        border-color: #d32f2f;
    }
    
    .nm-notification.nm-type-announcement {
        border-color: #7b1fa2;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .nm-notification,
    .nm-notification-popup .nm-popup-content {
        animation: none;
        transition: none;
    }
}

/* Apple Dynamic Island Notification Styles */
#nm-notification-island {
    position: fixed;
    z-index: 99999;
    pointer-events: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Prevent any interference from other styles */
    visibility: visible !important;
    display: block !important;
}

/* Island Content Container */
.nm-island-content {
    background: var(--wpex-on-accent);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    position: relative;
    min-height: auto;
    display: flex;
    flex-direction: column;
}

.nm-island-content:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

/* Compact State Content */
.nm-compact-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: #1d1d1f;
    opacity: 1;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    width: 100%;
}

.nm-compact-icon {
    font-size: 16px;
    color: #1d1d1f;
}

.nm-compact-badge {
    background: var(--wpex-accent);
    color: white;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.nm-compact-text {
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    white-space: nowrap;
}

/* Expanded State Content */
.nm-expanded-content {
    display: none !important;
    opacity: 0;
    color: #1d1d1f;
    padding: 0;
    transition: opacity 0.2s ease;
    width: 100%;
    min-height: 200px;
    max-height: 400px;
    flex: 1;
    flex-direction: column;
}

.nm-expanded-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nm-expanded-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

.nm-expanded-close {
    background: var(--wpex-accent);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.nm-expanded-close:hover {
    background: var(--wpex-accent);
    transform: scale(1.05);
}

.nm-expanded-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.nm-expanded-list::-webkit-scrollbar {
    width: 4px;
}

.nm-expanded-list::-webkit-scrollbar-track {
    background: transparent;
}

.nm-expanded-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.nm-notification-card {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
}

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

.nm-notification-card:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Dynamic Island State Transitions */
#nm-notification-island[data-expanded="false"] .nm-island-content {
    border-radius: 20px;
    min-width: 160px;
    width: auto;
    height: auto;
    min-height: auto;
}

#nm-notification-island[data-expanded="true"] .nm-island-content {
    border-radius: 20px;
    min-width: 350px;
    max-width: 420px;
    width: auto;
    cursor: default;
    min-height: 200px;
    height: auto;
}

#nm-notification-island.nm-expanding .nm-island-content {
    transform: scale(1.02);
}

#nm-notification-island.nm-collapsing .nm-island-content {
    transform: scale(0.98);
}

.nm-notification-item {
    padding: 16px;
    display: flex;
    gap: 12px;
    position: relative;
    transition: background-color 0.2s ease;
}

.nm-notification-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.nm-item-content {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.nm-item-icon {
    font-size: 16px;
    min-width: 20px;
    line-height: 1.2;
    margin-top: 2px;
}

.nm-item-text {
    flex: 1;
    min-width: 0;
}

.nm-item-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #1d1d1f;
}

.nm-item-message {
    font-size: 13px;
    line-height: 1.4;
    color: #6d6d70;
    word-wrap: break-word;
}

.nm-item-dismiss {
    background: var(--wpex-accent);
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: white;
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.nm-item-dismiss:hover {
    background: var(--wpex-accent);
    transform: scale(1.05);
}

/* Type-specific colors for notification center */
.nm-notification-item.nm-type-info .nm-item-icon {
    color: #007cba;
}

.nm-notification-item.nm-type-success .nm-item-icon {
    color: #46b450;
}

.nm-notification-item.nm-type-warning .nm-item-icon {
    color: #ffb900;
}

.nm-notification-item.nm-type-error .nm-item-icon {
    color: #dc3232;
}

.nm-notification-item.nm-type-announcement .nm-item-icon {
    color: #9c27b0;
}

/* Primary notification highlighting */
.nm-notification-item.nm-primary {
    background: #f0f8ff;
}

.nm-notification-item.nm-primary .nm-item-title {
    color: #0066cc;
}

/* Style variants for Dynamic Island notification items */

/* Default style: Full styled appearance (already has default styling) */
.nm-notification-item.nm-style-default {
    /* Uses existing default styles */
}

/* Minimal style: Removes decorative elements, keeps functionality */
.nm-notification-item.nm-style-minimal {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 12px 16px;
}

.nm-notification-item.nm-style-minimal:hover {
    background: rgba(0, 0, 0, 0.01);
}

.nm-notification-item.nm-style-minimal .nm-item-icon {
    opacity: 0.7;
}

.nm-notification-item.nm-style-minimal .nm-item-title {
    color: #333;
}

.nm-notification-item.nm-style-minimal .nm-item-message {
    color: #666;
}

/* None style: Only functional positioning, no visual styling */
.nm-notification-item.nm-style-none {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 8px !important;
}

.nm-notification-item.nm-style-none:hover {
    background: transparent !important;
}

.nm-notification-item.nm-style-none .nm-item-icon {
    display: none;
}

.nm-notification-item.nm-style-none .nm-item-title {
    color: inherit;
    font-weight: normal;
}

.nm-notification-item.nm-style-none .nm-item-message {
    color: inherit;
}

.nm-notification-item.nm-style-none .nm-item-dismiss {
    background: transparent;
    color: #666;
    box-shadow: none;
}

.nm-notification-item.nm-style-none .nm-item-dismiss:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

/* Position classes for Digital Island */
#nm-notification-island.nm-position-top_left {
    top: 20px;
    left: 20px;
}

#nm-notification-island.nm-position-top_center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
}

#nm-notification-island.nm-position-top_center[data-expanded="false"] {
    transform: translateX(-50%) scale(1);
}

#nm-notification-island.nm-position-top_center[data-expanded="true"] {
    transform: translateX(-50%) scale(1);
}

#nm-notification-island.nm-position-top_right {
    top: 20px;
    right: 20px;
}

#nm-notification-island.nm-position-bottom_left {
    bottom: 20px;
    left: 20px;
}

#nm-notification-island.nm-position-bottom_center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
}

#nm-notification-island.nm-position-bottom_center[data-expanded="false"] {
    transform: translateX(-50%) scale(1);
}

#nm-notification-island.nm-position-bottom_center[data-expanded="true"] {
    transform: translateX(-50%) scale(1);
}

#nm-notification-island.nm-position-bottom_right {
    bottom: 20px;
    right: 20px;
}

#nm-notification-island.nm-position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
}

#nm-notification-island.nm-position-center[data-expanded="false"] {
    transform: translate(-50%, -50%) scale(1);
}

#nm-notification-island.nm-position-center[data-expanded="true"] {
    transform: translate(-50%, -50%) scale(1);
}

/* Animations for notification center */
@keyframes nm-center-expand {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive for Dynamic Island */
@media (max-width: 768px) {
    #nm-notification-island {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) scale(0.9) !important;
    }
    
    #nm-notification-island.nm-position-top_center,
    #nm-notification-island.nm-position-bottom_center,
    #nm-notification-island.nm-position-center {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) scale(0.9) !important;
    }
    
    #nm-notification-island.nm-position-top_left,
    #nm-notification-island.nm-position-top_right,
    #nm-notification-island.nm-position-bottom_left,
    #nm-notification-island.nm-position-bottom_right {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) scale(0.9) !important;
    }
    
    #nm-notification-island[data-expanded="true"] .nm-island-content {
        min-width: auto !important;
        max-width: none !important;
        width: calc(100vw - 40px) !important;
    }
    
    .nm-expanded-list {
        max-height: 60vh;
    }
    
    .nm-compact-content {
        padding: 10px 16px;
        justify-content: center;
    }
    
    .nm-notification-item {
        padding: 12px;
    }
    
    .nm-item-content {
        gap: 8px;
    }
    
    .nm-item-title {
        font-size: 12px;
    }
    
    .nm-item-message {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .nm-compact-content {
        padding: 8px 14px;
        gap: 6px;
    }
    
    .nm-compact-text {
        display: none;
    }
    
    .nm-compact-icon {
        font-size: 14px;
    }
    
    .nm-compact-badge {
        font-size: 10px;
        padding: 2px 6px;
        min-width: 16px;
    }
    
    #nm-notification-island[data-expanded="false"] .nm-island-content {
        min-width: 80px;
    }
    
    #nm-notification-island[data-expanded="true"] .nm-island-content {
        width: calc(100vw - 20px) !important;
    }
    
    .nm-expanded-list {
        max-height: 50vh;
    }
    
    .nm-expanded-header {
        padding: 12px 16px 8px;
    }
    
    .nm-expanded-title {
        font-size: 14px;
    }
    
    .nm-notification-item {
        padding: 10px;
    }
}

/* ============================================================
   Notification Bar
   ============================================================ */

.nm-notification-bar {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    transition: opacity 0.3s;
    z-index: 9999;
}

/* 1. Very top — sticky, sits above everything */
.nm-notification-bar.nm-bar-very-top {
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* 2. Below navigation — in page flow at injection point */
.nm-notification-bar.nm-bar-below-nav {
    position: relative;
}

/* 3. Above footer — in page flow just before footer */
.nm-notification-bar.nm-bar-above-footer {
    position: relative;
}

/* 4. Below footer — fixed to bottom of viewport */
.nm-notification-bar.nm-bar-below-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

body.nm-has-bar-bottom {
    padding-bottom: 34px !important;
}

/* Offset very-top bar when WP admin bar is present */
.admin-bar .nm-notification-bar.nm-bar-very-top {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar .nm-notification-bar.nm-bar-very-top {
        top: 46px;
    }
}

.nm-bar-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 34px;
}

/* Bell icon (left) */
.nm-bar-bell {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
    opacity: 0.9;
}

/* Ticker (centre) */
.nm-bar-ticker-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.nm-bar-ticker-inner {
    display: inline-block;
    white-space: nowrap;
    /* transform is driven exclusively by the Web Animations API in JS */
}

.nm-bar-ticker-text {
    display: inline;
    font-size: 14px;
    line-height: 1.4;
}

.nm-bar-ticker-link,
.nm-bar-ticker-link:hover,
.nm-bar-ticker-link:focus,
.nm-bar-ticker-link:active,
.nm-bar-ticker-link:visited {
    color: inherit;
    text-decoration: none;
    cursor: auto;
}

.nm-bar-ticker-link[href] {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease;
}

.nm-bar-ticker-link[href]:hover,
.nm-bar-ticker-link[href]:focus {
    text-decoration: underline;
    text-decoration-color: currentColor;
    cursor: pointer;
}

.nm-bar-cta {
    flex-shrink: 0;
    display: inline-block;
    background: #6E47E6;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.nm-bar-cta:hover {
    background: #1EE883;
    color: #6E47E6;
}

@media (prefers-reduced-motion: reduce) {
    .nm-bar-ticker-inner {
        transform: none !important;
        animation: none !important;
    }
}

/* Nav (right of ticker) */
.nm-bar-nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nm-bar-prev,
.nm-bar-next {
    background: rgba(255,255,255,0.22);
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nm-bar-prev:hover,
.nm-bar-next:hover {
    background: rgba(255,255,255,0.38);
}

.nm-bar-counter {
    background: rgba(255,255,255,0.22);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    white-space: nowrap;
    line-height: 1.4;
}

/* Dismiss (far right) */
.nm-bar-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.7;
    color: inherit;
}

.nm-bar-dismiss:hover {
    opacity: 1;
}

/* Legacy single-bar elements (kept for backward compat) */
.nm-bar-icon { flex-shrink: 0; font-size: 18px; line-height: 1; }
.nm-bar-body { flex: 1; min-width: 0; }
.nm-bar-title { font-weight: 700; margin-right: 4px; }
.nm-bar-message a { text-decoration: underline; }

/* Type colours (match notification type palette) */
.nm-notification-bar.nm-type-info {
    background-color: #3b82f6;
    color: #fff;
}
.nm-notification-bar.nm-type-success {
    background-color: #22c55e;
    color: #fff;
}
.nm-notification-bar.nm-type-warning {
    background-color: #f59e0b;
    color: #fff;
}
.nm-notification-bar.nm-type-error {
    background-color: #ef4444;
    color: #fff;
}
.nm-notification-bar.nm-type-announcement {
    background-color: #8b5cf6;
    color: #fff;
}

/* Minimal style — lighter background */
.nm-notification-bar.nm-style-minimal.nm-type-info        { background-color: #eff6ff; color: #1d4ed8; border-top: 2px solid #3b82f6; border-bottom: 2px solid #3b82f6; }
.nm-notification-bar.nm-style-minimal.nm-type-success     { background-color: #f0fdf4; color: #15803d; border-top: 2px solid #22c55e; border-bottom: 2px solid #22c55e; }
.nm-notification-bar.nm-style-minimal.nm-type-warning     { background-color: #fffbeb; color: #92400e; border-top: 2px solid #f59e0b; border-bottom: 2px solid #f59e0b; }
.nm-notification-bar.nm-style-minimal.nm-type-error       { background-color: #fef2f2; color: #b91c1c; border-top: 2px solid #ef4444; border-bottom: 2px solid #ef4444; }
.nm-notification-bar.nm-style-minimal.nm-type-announcement{ background-color: #f5f3ff; color: #6d28d9; border-top: 2px solid #8b5cf6; border-bottom: 2px solid #8b5cf6; }

/* Admin bar: bottom bar needs a nudge so it clears the (non-fixed) admin bar shadow */
.admin-bar .nm-notification-bar.nm-bar-bottom {
    bottom: 0;
}

/* ============================================================
   Notification Centre — pill trigger + drop-down panel
   ============================================================ */

#nm-notification-island {
    position: fixed;
    z-index: 2147483646;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    --nm-nc-purple: #6e47e6;
    --nm-nc-ink: #1d2138;
    --nm-nc-rule: #dfe2ea;
}

/* Positioning — !important overrides old Dynamic Island CSS */
#nm-notification-island.nm-position-top_right    { top: 20px; right: 20px; transform: none !important; }
#nm-notification-island.nm-position-top_left     { top: 20px; left: 20px; transform: none !important; }
#nm-notification-island.nm-position-top_center   { top: 20px; left: 50%; transform: translateX(-50%) !important; }
#nm-notification-island.nm-position-bottom_right { bottom: 20px; right: 20px; transform: none !important; }
#nm-notification-island.nm-position-bottom_left  { bottom: 20px; left: 20px; transform: none !important; }
#nm-notification-island.nm-position-bottom_center{ bottom: 20px; left: 50%; transform: translateX(-50%) !important; }
#nm-notification-island.nm-position-center       { top: 50%; left: 50%; transform: translate(-50%, -50%) !important; }

/* Trigger pill */
.nm-nc-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid rgba(29, 33, 56, 0.16);
    border-radius: 14px;
    padding: 8px 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(29, 33, 56, 0.16);
    font-size: 1rem;
    line-height: 1.2;
    color: var(--nm-nc-ink);
    white-space: nowrap;
    transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.2s ease;
}

.nm-nc-trigger:hover {
    box-shadow: 0 4px 14px rgba(29, 33, 56, 0.2);
}

#nm-notification-island.is-open .nm-nc-trigger {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.98);
}

.nm-nc-trigger-bell {
    font-size: 1.15rem;
    color: var(--nm-nc-ink);
    line-height: 1;
}

.nm-nc-badge {
    background: var(--nm-nc-purple);
    color: #ffffff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

/* Panel — hidden by default, revealed by .is-open */
.nm-nc-panel {
    position: fixed; /* JS sets top/left via getBoundingClientRect() */
    z-index: 2147483647;
    --nm-nc-purple: #6e47e6;
    --nm-nc-ink: #1d2138;
    --nm-nc-rule: #dfe2ea;
    width: 390px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 42px rgba(29, 33, 56, 0.22);
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    transform-origin: bottom center;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nm-nc-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.nm-nc-panel-header {
    background: var(--nm-nc-purple);
    color: #ffffff;
    min-height: auto;
    padding: 14px 16px 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nm-nc-panel-title {
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.2;
}

.nm-nc-close {
    background: #ffffff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    color: var(--nm-nc-purple);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    padding: 0 0 3px;
}

.nm-nc-close:hover {
    box-shadow: 0 4px 14px rgba(29, 33, 56, 0.18);
    transform: scale(1.04);
}

/* Item list */
.nm-nc-list {
    max-height: min(70vh, 430px);
    overflow-y: auto;
}

.nm-nc-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: auto;
    padding: 16px 20px;
    border-bottom: 1px solid var(--nm-nc-rule);
    transition: opacity 0.2s ease, background 0.2s ease;
}

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

.nm-nc-item-icon,
.nm-nc-item-dismiss {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--nm-nc-purple);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex: 0 0 34px;
    margin-top: 2px;
}

/* Type-tinted icon backgrounds */
.nm-nc-item.nm-type-success  .nm-nc-item-icon { background: #22c55e; }
.nm-nc-item.nm-type-warning  .nm-nc-item-icon { background: #f59e0b; }
.nm-nc-item.nm-type-error    .nm-nc-item-icon { background: #ef4444; }

.nm-nc-item-body {
    flex: 1;
    min-width: 0;
}

.nm-nc-item-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--nm-nc-ink);
    margin-bottom: 4px;
}

.nm-nc-item-message {
    font-size: 14px;
    line-height: 1.2;
    color: var(--nm-nc-ink);
}

.nm-nc-item-message p {
    margin-bottom: 14px;
}

.nm-nc-item-message p:last-child {
    margin-bottom: 0;
}

.nm-nc-item-button {
    display: inline-block;
    margin-top: 10px;
    background: var(--nm-nc-purple);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.nm-nc-item-button:hover {
    background: #1EE883;
    color: var(--nm-nc-purple);
}

.nm-nc-item-dismiss {
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
    transition: transform 0.18s ease, background 0.18s ease;
}

.nm-nc-item-dismiss:hover {
    background: #5d38d8;
    transform: scale(1.06);
}

@media (max-width: 480px) {
    .nm-nc-trigger {
        gap: 10px;
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 0.95rem;
    }

    .nm-nc-trigger-bell {
        font-size: 1rem;
    }

    .nm-nc-badge {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .nm-nc-panel {
        border-radius: 14px;
    }

    .nm-nc-panel-header {
        padding: 13px 14px 13px 18px;
    }

    .nm-nc-panel-title {
        font-size: 1.1rem;
    }

    .nm-nc-close {
        width: 32px;
        height: 32px;
        font-size: 1.65rem;
    }

    .nm-nc-item {
        gap: 12px;
        padding: 14px 16px;
    }

    .nm-nc-item-message {
        font-size: 14px;
        line-height: 1.2;
    }
}

/* Print Styles */
@media print {
    #nm-notification-container,
    #nm-notification-island,
    .nm-notification-popup,
    .nm-notification-bar {
        display: none !important;
    }
    
    .nm-notification-shortcode,
    .nm-notification-banner,
    .nm-notification-list {
        break-inside: avoid;
    }
}
