/**
 * ENNU Life Assessments - Modal System Unified (Single Source)
 * Version: 99.6.3
 * 
 * THIS IS THE SINGLE SOURCE FOR ALL MODAL STYLING
 * ALL OTHER MODAL CSS SHOULD BE REMOVED TO PREVENT CONFLICTS
 * 
 * Unified modal system supporting:
 * - Assessment modals
 * - Data entry modals
 * - Error/success notifications
 * - Biomarker detail modals
 * - Chart zoom modals
 * - Progress modals
 * - Confirmation dialogs
 */

/* =================================================================
   CORE MODAL STRUCTURE (Foundation)
   ================================================================= */

.ennu-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ennu-modal.show,
.ennu-modal[style*="display: block"],
.ennu-modal[style*="display:block"] {
    display: flex !important;
    opacity: 1;
}

.ennu-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

/* =================================================================
   MODAL CONTENT CONTAINER (Responsive)
   ================================================================= */

.ennu-modal-content {
    background-color: #1a1a1a;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 900px;
    min-width: 300px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    transform: none;
    left: auto;
    right: auto;
    display: block;
    color: #e5e5e5;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Large Modal Variant */
.ennu-modal-content.large {
    max-width: 1200px;
    width: 98%;
}

/* Small Modal Variant */
.ennu-modal-content.small {
    max-width: 600px;
    width: 90%;
}

/* =================================================================
   MODAL ANIMATIONS
   ================================================================= */

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

.ennu-modal.closing .ennu-modal-content {
    animation: modalSlideOut 0.2s ease-in;
}

/* =================================================================
   MODAL HEADER SYSTEM
   ================================================================= */

.ennu-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    background: #2a2a2a;
    border-radius: 12px 12px 0 0;
    min-height: 60px;
}

/* Modal Logo */
.ennu-modal-logo {
    height: 32px;
    width: auto;
    margin-right: 12px;
    vertical-align: middle;
}

.ennu-modal-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ennu-modal-header h2,
.ennu-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px 25px 0;
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.modal-header p {
    color: #9ca3af;
    margin: 0;
    font-size: 16px;
}

/* =================================================================
   MODAL CLOSE SYSTEM (Unified)
   ================================================================= */

.ennu-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
}

.ennu-modal-close:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

.ennu-modal-close:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Header-embedded close button */
.ennu-modal-header .ennu-modal-close {
    position: relative;
    right: auto;
    top: auto;
    margin-left: 15px;
}

/* =================================================================
   MODAL BODY CONTENT - Enhanced Readability
   ================================================================= */

.ennu-modal-body {
    padding: 25px;
    min-height: 100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.ennu-modal-body h1,
.ennu-modal-body h2,
.ennu-modal-body h3,
.ennu-modal-body h4,
.ennu-modal-body h5,
.ennu-modal-body h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 16px 0;
    color: #ffffff;
}

.ennu-modal-body h3 {
    font-size: 20px;
}

.ennu-modal-body h4 {
    font-size: 18px;
}

.ennu-modal-body p {
    margin: 0 0 16px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #ffffff;
}

.ennu-modal-body ul,
.ennu-modal-body ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
    font-size: 15px;
    line-height: 1.6;
}

.ennu-modal-body li {
    margin-bottom: 8px;
    color: #ffffff;
}

.ennu-modal-body strong,
.ennu-modal-body b {
    font-weight: 600;
    color: #ffffff;
}

.ennu-modal-body em,
.ennu-modal-body i {
    font-style: italic;
    color: #9ca3af;
}

.missing-data-modal {
    padding: 30px;
}

#biomarker-modal-body {
    padding: 25px;
}

/* =================================================================
   ASSESSMENT RECOMMENDATIONS SYSTEM
   ================================================================= */

.assessment-recommendations {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.assessment-recommendation {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.assessment-recommendation:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.assessment-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.assessment-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.assessment-action {
    background: #007cba;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    text-decoration: none;
}

.assessment-action:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* =================================================================
   PILLAR ORB INTEGRATION
   ================================================================= */

.pillar-orb.no-data {
    cursor: pointer;
    transition: all 0.3s ease;
}

.pillar-orb.no-data:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pillar-orb-notice {
    text-align: center;
    padding: 10px;
}

.notice-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: #007cba;
}

.notice-title {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 4px;
}

.notice-action {
    font-size: 12px;
    color: #007cba;
    font-weight: 500;
}

/* =================================================================
   BIOMARKER DETAILS SYSTEM
   ================================================================= */

.ennu-biomarker-details-view {
    max-width: 100%;
}

.ennu-biomarker-info {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.ennu-biomarker-info p {
    margin: 0 0 14px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 400;
}

.ennu-biomarker-info strong {
    font-weight: 600;
    color: #ffffff;
}

.ennu-biomarker-info .biomarker-value {
    font-size: 16px;
    font-weight: 600;
    color: #e5e5e5;
}

.ennu-biomarker-info .biomarker-range {
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
}

.ennu-biomarker-info p:last-child {
    margin-bottom: 0;
}

/* =================================================================
   MODAL STATE SYSTEMS
   ================================================================= */

/* Error State - Enhanced Readability */
.modal-error {
    padding: 30px;
    text-align: center;
    color: #b91c1c;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #fca5a5;
    border-radius: 8px;
    margin: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Success State - Enhanced Readability */
.modal-success {
    padding: 30px;
    text-align: center;
    color: #047857;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid #86efac;
    border-radius: 8px;
    margin: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Loading State - Enhanced Readability */
.modal-loading {
    padding: 40px;
    text-align: center;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modal-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================================================================
   MODAL CONTAINER SYSTEM
   ================================================================= */

.ennu-modal-container {
    position: relative;
    width: 100%;
    min-height: 200px;
}

.ennu-modal-container.large {
    min-height: 400px;
}

/* =================================================================
   PROGRESS MODAL SYSTEM
   ================================================================= */

.ennu-progress-modal-container .ennu-modal-content {
    max-width: 600px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.ennu-progress-modal {
    text-align: center;
    padding: 40px 30px;
}

.ennu-progress-modal .modal-header {
    margin-bottom: 40px;
}

.progress-modal-content {
    text-align: center;
    padding: 40px 30px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 40px 0;
    padding: 0 20px;
    gap: 15px;
}

.progress-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    transition: all 0.4s ease;
}

.progress-steps .step .step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    z-index: 2;
    position: relative;
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.progress-steps .step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    animation: pulse 1.5s ease-in-out infinite;
}

.progress-steps .step.completed .step-number {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.progress-steps .step .step-title {
    font-size: 14px;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 1.4;
    font-weight: 500;
    transition: all 0.3s ease;
}

.progress-steps .step.active .step-title {
    color: #ffffff;
    font-weight: 600;
}

.progress-steps .step.completed .step-title {
    color: rgba(255, 255, 255, 0.7);
}

.progress-steps .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px;
    left: calc(50% + 25px);
    width: calc(100% - 50px);
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
    transition: all 0.4s ease;
}

.progress-steps .step.active:not(:last-child)::after,
.progress-steps .step.completed:not(:last-child)::after {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.progress-text {
    margin-top: 30px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.progress-step.active:not(:last-child)::after {
    background: #007cba;
}

.progress-step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

.progress-step.active .progress-step-icon {
    background: #007cba;
    color: white;
    animation: pulse 1s infinite;
}

.progress-step.completed .progress-step-icon {
    background: #28a745;
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.progress-step-text {
    font-size: 14px;
    margin-top: 8px;
    color: #9ca3af;
    text-align: center;
    line-height: 1.4;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.progress-step.active .progress-step-text {
    color: #007cba;
    font-weight: 600;
}

/* =================================================================
   RESPONSIVE DESIGN SYSTEM
   ================================================================= */

/* Tablet Styles */
@media (max-width: 768px) {
    .ennu-modal-content {
        width: 98% !important;
        max-width: none !important;
        margin: 1% auto !important;
        border-radius: 8px;
        max-height: 95vh;
    }
    
    .ennu-modal {
        padding: 10px;
    }
    
    .ennu-modal-header {
        padding: 15px 20px;
    }
    
    .ennu-modal-body,
    .missing-data-modal,
    #biomarker-modal-body {
        padding: 20px;
        font-size: 16px;
        line-height: 1.6;
    }
    
    .ennu-modal-body h3 {
        font-size: 19px;
    }
    
    .ennu-modal-body h4 {
        font-size: 17px;
    }
    
    .ennu-biomarker-info p {
        font-size: 16px;
    }
    
    .assessment-name {
        font-size: 18px;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 25px;
        padding: 0 10px;
    }

    .progress-steps .step:not(:last-child)::after {
        display: none;
    }

    .progress-steps .step {
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
    }

    .progress-steps .step .step-title {
        text-align: left;
        margin-top: 0;
        font-size: 15px;
    }
    
    .ennu-modal-container {
        margin: 10px 0;
    }
    
    .ennu-modal-container.large {
        min-height: 300px;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    .ennu-modal-content {
        width: 99% !important;
        margin: 0.5% auto !important;
        border-radius: 4px;
        max-height: 98vh;
    }
    
    .ennu-modal-close {
        right: 10px;
        top: 10px;
        font-size: 20px;
        width: 25px;
        height: 25px;
    }
    
    .ennu-modal-header {
        padding: 10px 15px;
        min-height: 50px;
    }
    
    .ennu-modal-header h3 {
        font-size: 18px;
    }
    
    .modal-header h3 {
        font-size: 20px;
    }
    
    .ennu-modal-body,
    .missing-data-modal,
    #biomarker-modal-body {
        padding: 15px;
        font-size: 17px;
        line-height: 1.7;
    }
    
    .ennu-modal-body h3 {
        font-size: 20px;
        margin-bottom: 18px;
    }
    
    .ennu-modal-body h4 {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .ennu-modal-body p {
        font-size: 17px;
        margin-bottom: 18px;
    }
    
    .ennu-biomarker-info p {
        font-size: 17px;
        margin-bottom: 16px;
    }
    
    .assessment-name {
        font-size: 19px;
        line-height: 1.5;
    }
    
    .progress-step-text {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .assessment-recommendation {
        padding: 15px;
    }
    
    .assessment-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .assessment-action {
        align-self: flex-end;
    }
    
    .progress-modal-content {
        padding: 20px 15px;
    }
}

/* =================================================================
   ENHANCED READABILITY & ACCESSIBILITY IMPROVEMENTS
   ================================================================= */

/* Improve text selection and focus visibility */
.ennu-modal-body *::selection {
    background: #b3d9ff;
    color: #ffffff;
}

.ennu-modal-body *::-moz-selection {
    background: #b3d9ff;
    color: #ffffff;
}

/* Enhance focus states for keyboard navigation */
.ennu-modal-body a:focus,
.ennu-modal-body button:focus,
.ennu-modal-body input:focus,
.ennu-modal-body select:focus,
.ennu-modal-body textarea:focus {
    outline: 3px solid #007cba;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Improve link readability */
.ennu-modal-body a {
    color: #007cba;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ennu-modal-body a:hover {
    color: #005a87;
    text-decoration: none;
}

/* Improve code/technical text readability */
.ennu-modal-body code,
.ennu-modal-body pre {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    background: #2a2a2a;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
}

/* Improve table readability */
.ennu-modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.ennu-modal-body th,
.ennu-modal-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.5;
}

.ennu-modal-body th {
    background: #2a2a2a;
    font-weight: 600;
    color: #ffffff;
}

/* =================================================================
   ACCESSIBILITY ENHANCEMENTS
   ================================================================= */

.ennu-modal[aria-hidden="true"] {
    display: none !important;
}

.ennu-modal[aria-hidden="false"] {
    display: flex !important;
}

.ennu-modal-content:focus {
    outline: 2px solid #007cba;
    outline-offset: -2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ennu-modal-content {
        animation: none;
    }
    
    .ennu-modal {
        transition: none;
    }
    
    .progress-step.active .progress-step-icon {
        animation: none;
    }
    
    .modal-loading::after {
        animation: none;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .ennu-modal {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .ennu-modal-content {
        border: 2px solid #000;
    }
    
    .assessment-recommendation {
        border: 1px solid #666;
    }
}

/* =================================================================
   PRINT STYLES (Hide Modals)
   ================================================================= */

@media print {
    .ennu-modal {
        display: none !important;
    }
}

/* =================================================================
   UNIFIED NOTIFICATION SYSTEM (Toast & Modal Notifications)
   ================================================================= */

/* Notifications Container */
.ennu-notifications-container {
    position: fixed;
    z-index: 10000; /* Above modals */
    pointer-events: none;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
}

/* Base Notification Styles - Enhanced Modern Design */
.ennu-notification {
    position: fixed;
    z-index: 10001;
    max-width: 420px;
    min-width: 320px;
    border-radius: 16px;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    opacity: 0;
    transform: translateX(100%) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.ennu-notification.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.ennu-notification.dismissing {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 1, 1);
}

/* Position Variants */
.ennu-notification-top-right {
    top: 20px;
    right: 20px;
}

.ennu-notification-top-left {
    top: 20px;
    left: 20px;
    transform: translateX(-100%);
}

.ennu-notification-top-left.show {
    transform: translateX(0);
}

.ennu-notification-top-left.dismissing {
    transform: translateX(-100%);
}

.ennu-notification-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
}

.ennu-notification-top-center.show {
    transform: translateX(-50%) translateY(0);
}

.ennu-notification-top-center.dismissing {
    transform: translateX(-50%) translateY(-100%);
}

.ennu-notification-bottom-right {
    bottom: 20px;
    right: 20px;
    transform: translateX(100%) translateY(100%);
}

.ennu-notification-bottom-right.show {
    transform: translateX(0) translateY(0);
}

.ennu-notification-bottom-right.dismissing {
    transform: translateX(100%) translateY(100%);
}

/* Notification Content - Enhanced Modern Layout */
.ennu-notification-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
}

.ennu-notification-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50%;
    margin-top: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.ennu-notification-message {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.ennu-notification-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.ennu-notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Notification Type Styles - Enhanced Modern Gradients */
.ennu-notification-success {
    background: linear-gradient(135deg, 
        #10b981 0%, 
        #059669 50%, 
        #047857 100%);
    color: white;
    box-shadow: 
        0 20px 25px -5px rgba(16, 185, 129, 0.25),
        0 10px 10px -5px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ennu-notification-success .ennu-notification-icon {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ennu-notification-error {
    background: linear-gradient(135deg, 
        #ef4444 0%, 
        #dc2626 50%, 
        #b91c1c 100%);
    color: white;
    box-shadow: 
        0 20px 25px -5px rgba(239, 68, 68, 0.25),
        0 10px 10px -5px rgba(239, 68, 68, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ennu-notification-error .ennu-notification-icon {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ennu-notification-warning {
    background: linear-gradient(135deg, 
        #f59e0b 0%, 
        #d97706 50%, 
        #b45309 100%);
    color: white;
    box-shadow: 
        0 20px 25px -5px rgba(245, 158, 11, 0.25),
        0 10px 10px -5px rgba(245, 158, 11, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ennu-notification-warning .ennu-notification-icon {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ennu-notification-info {
    background: linear-gradient(135deg, 
        #3b82f6 0%, 
        #2563eb 50%, 
        #1d4ed8 100%);
    color: white;
    box-shadow: 
        0 20px 25px -5px rgba(59, 130, 246, 0.25),
        0 10px 10px -5px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ennu-notification-info .ennu-notification-icon {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Beautiful Hover Effects and Micro-interactions */
.ennu-notification:hover {
    transform: translateX(0) scale(1.02);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

.ennu-notification:hover .ennu-notification-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Pulse animation for important notifications */
@keyframes notification-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.ennu-notification.pulse {
    animation: notification-pulse 2s ease-in-out infinite;
}

/* Gentle breathing effect for persistent notifications */
@keyframes notification-breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.ennu-notification.persistent {
    animation: notification-breathe 4s ease-in-out infinite;
}

/* Modal Notification Styles */
.ennu-modal-notification {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    text-align: left;
}

.ennu-modal-notification .notification-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.ennu-modal-notification .notification-message {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
    color: #ffffff;
}

.ennu-modal-notification-success .notification-icon {
    background: #d4edda;
    color: #155724;
}

.ennu-modal-notification-error .notification-icon {
    background: rgba(220, 38, 38, 0.2);
    color: #721c24;
}

.ennu-modal-notification-warning .notification-icon {
    background: rgba(234, 179, 8, 0.2);
    color: #856404;
}

.ennu-modal-notification-info .notification-icon {
    background: #d1ecf1;
    color: #0c5460;
}

/* Modal Notification Buttons */
.btn-success {
    background: #48bb78;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-success:hover {
    background: #38a169;
}

.btn-error {
    background: #f56565;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-error:hover {
    background: #e53e3e;
}

.btn-warning {
    background: #ed8936;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-warning:hover {
    background: #dd6b20;
}

.btn-info {
    background: #4299e1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-info:hover {
    background: #3182ce;
}

/* Enhanced Responsive Notification Styles - Modern Mobile-First */
@media (max-width: 640px) {
    .ennu-notification {
        max-width: calc(100vw - 24px);
        min-width: calc(100vw - 24px);
        left: 12px !important;
        right: 12px !important;
        border-radius: 12px;
        transform: translateY(-100%) scale(0.98) !important;
    }
    
    .ennu-notification-content {
        padding: 16px 20px;
        gap: 12px;
    }
    
    .ennu-notification-message {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .ennu-notification-icon {
        width: 24px;
        height: 24px;
    }
    
    .ennu-notification-close {
        top: 12px;
        right: 12px;
        width: 24px;
        height: 24px;
        border-radius: 6px;
    }
    
    .ennu-notification-top-right,
    .ennu-notification-top-left,
    .ennu-notification-top-center {
        left: 12px !important;
        right: 12px !important;
        transform: translateY(-100%) scale(0.98) !important;
    }
    
    .ennu-notification-top-right.show,
    .ennu-notification-top-left.show,
    .ennu-notification-top-center.show {
        transform: translateY(0) scale(1) !important;
    }
    
    .ennu-notification:hover {
        transform: translateY(0) scale(1.01) !important;
    }
}

@media (max-width: 380px) {
    .ennu-notification {
        left: 8px !important;
        right: 8px !important;
        max-width: calc(100vw - 16px);
        min-width: calc(100vw - 16px);
        border-radius: 10px;
    }
    
    .ennu-notification-content {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .ennu-notification-message {
        font-size: 13px;
    }
}
    
    .ennu-notification-top-right.dismissing,
    .ennu-notification-top-left.dismissing,
    .ennu-notification-top-center.dismissing {
        transform: translateY(-100%) !important;
    }
    
    .ennu-notification-bottom-right {
        bottom: 20px;
        left: 20px !important;
        right: 20px !important;
        transform: translateY(100%) !important;
    }
    
    .ennu-notification-bottom-right.show {
        transform: translateY(0) !important;
    }
    
    .ennu-notification-bottom-right.dismissing {
        transform: translateY(100%) !important;
    }
}

/* Stacked Notifications */
.ennu-notification:nth-child(2) {
    top: calc(20px + 80px);
}

.ennu-notification:nth-child(3) {
    top: calc(20px + 160px);
}

.ennu-notification:nth-child(4) {
    top: calc(20px + 240px);
}

.ennu-notification:nth-child(5) {
    top: calc(20px + 320px);
}

/* Accessibility Enhancements */
.ennu-notification[role="alert"] {
    /* Announced by screen readers */
}

.ennu-notification-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ennu-notification {
        border: 2px solid;
    }
    
    .ennu-notification-success {
        border-color: #2f855a;
    }
    
    .ennu-notification-error {
        border-color: #c53030;
    }
    
    .ennu-notification-warning {
        border-color: #c05621;
    }
    
    .ennu-notification-info {
        border-color: #2c5282;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ennu-notification {
        transition: opacity 0.2s ease;
        transform: none !important;
    }
    
    .ennu-notification.show {
        opacity: 1;
    }
    
    .ennu-notification.dismissing {
        opacity: 0;
    }
}

/* =================================================================
   ERROR & SUCCESS MODALS
   ================================================================= */

/* Error Modal Styles */
.ennu-error-modal-container .ennu-modal-content {
    max-width: 500px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.ennu-error-modal {
    text-align: center;
    padding: 20px;
}

.ennu-error-modal .modal-header {
    margin-bottom: 30px;
}

.ennu-error-modal .modal-header img {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
}

.ennu-error-modal .error-content {
    margin: 30px 0;
}

.ennu-error-modal .error-icon {
    margin: 0 auto 20px;
}

.ennu-error-modal .error-icon svg {
    animation: pulse 2s infinite;
}

.ennu-error-modal .error-message {
    font-size: 16px;
    line-height: 1.6;
    margin: 15px 0;
}

.ennu-error-modal .error-details {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.ennu-error-modal .modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.ennu-error-modal .btn-retry,
.ennu-error-modal .btn-close {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ennu-error-modal .btn-retry {
    background: linear-gradient(45deg, #ff4444, #ff6666);
    color: white;
}

.ennu-error-modal .btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
}

.ennu-error-modal .btn-close {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ennu-error-modal .btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Success Modal Styles */
.ennu-success-modal-container .ennu-modal-content {
    max-width: 500px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.ennu-success-modal {
    text-align: center;
    padding: 20px;
}

.ennu-success-modal .modal-header {
    margin-bottom: 30px;
}

.ennu-success-modal .modal-header img {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
}

.ennu-success-modal .success-content {
    margin: 30px 0;
}

.ennu-success-modal .success-icon {
    margin: 0 auto 20px;
}

.ennu-success-modal .success-icon svg {
    animation: checkmark 0.5s ease-in-out;
}

.ennu-success-modal .success-message {
    font-size: 18px;
    line-height: 1.6;
    margin: 15px 0;
}

.ennu-success-modal .redirect-notice {
    margin-top: 10px;
    font-style: italic;
}

.ennu-success-modal .modal-actions {
    margin-top: 30px;
}

.ennu-success-modal .btn-dashboard {
    padding: 12px 40px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    background: linear-gradient(45deg, #4CAF50, #6FBF73);
    color: white;
    transition: all 0.3s ease;
}

.ennu-success-modal .btn-dashboard:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =================================================================
   END OF UNIFIED MODAL SYSTEM
   ================================================================= */
