/* Unified Notification System - Consistent top banner notifications */

/* Base unified notification styles */
.unified-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.5s ease-out;
    font-family: inherit;
}

.unified-notification.visible {
    opacity: 1;
    transform: translateY(0);
}

.unified-notification.hiding {
    animation: unifiedSlideUp 0.5s ease-in forwards;
}

.unified-notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 50px;
    box-sizing: border-box;
    /* Safe area support for iPhone notch/Dynamic Island */
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-left: calc(24px + env(safe-area-inset-left, 0px));
    padding-right: calc(24px + env(safe-area-inset-right, 0px));
}

.unified-notification-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.4;
}

.unified-notification-main {
    font-weight: 600;
    font-size: 16px;
}

.unified-notification-sub {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.unified-notification-dismiss {
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.unified-notification-dismiss:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Color variants */

/* Success notifications (green) */
.unified-notification.success {
    background: #10251A;
    color: #d1fae5;
}

/* Error notifications (red) */
.unified-notification.error {
    background: #4a2222;
    color: #fee2e2;
}

/* Info notifications (blue) */
.unified-notification.info {
    background: #1e3a8a;
    color: #dbeafe;
}

/* Warning notifications (orange) */
.unified-notification.warning {
    background: #7c2d12;
    color: #fed7aa;
}

/* Subscription notifications (purple gradient) */
.unified-notification.subscription {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
}

.unified-notification.subscription:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Default/neutral notifications (dark) */
.unified-notification.neutral {
    background: #000000;
    color: white;
}

/* Exercise swap notifications (matching workouts-logging header) */
.unified-notification.exercise-swap {
    background: #000000;
    color: #42c2c9;
    min-height: 65px;
}

.unified-notification.exercise-swap .unified-notification-content {
    min-height: 65px;
    padding: 20px 24px;
    /* Safe area support for iPhone notch/Dynamic Island */
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
    padding-left: calc(24px + env(safe-area-inset-left, 0px));
    padding-right: calc(24px + env(safe-area-inset-right, 0px));
}

/* Animations */
@keyframes unifiedSlideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-100%);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .unified-notification-content {
        padding: 12px 16px;
        gap: 12px;
        /* Safe area support for iPhone notch/Dynamic Island on mobile */
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
        padding-left: calc(16px + env(safe-area-inset-left, 0px));
        padding-right: calc(16px + env(safe-area-inset-right, 0px));
    }

    .unified-notification-main {
        font-size: 15px;
    }

    .unified-notification-sub {
        font-size: 13px;
    }
}

/* Ensure notifications stack properly if multiple exist */
.unified-notification+.unified-notification {
    top: 60px;
}

.unified-notification+.unified-notification+.unified-notification {
    top: 120px;
}