/* Banner Notification Styles */

:root {
    --banner-success-bg: #ecfdf5;
    --banner-success-border: #a7f3d0;
    --banner-success-text: #065f46;
    --banner-success-icon: #059669;

    --banner-error-bg: #fef2f2;
    --banner-error-border: #fecaca;
    --banner-error-text: #7f1d1d;
    --banner-error-icon: #dc2626;

    --banner-warning-bg: #fffbeb;
    --banner-warning-border: #fde68a;
    --banner-warning-text: #78350f;
    --banner-warning-icon: #d97706;

    --banner-info-bg: #eff6ff;
    --banner-info-border: #93c5fd;
    --banner-info-text: #1e3a8a;
    --banner-info-icon: #3b82f6;

    --banner-z-index: 9999;
    --banner-animation-duration: 300ms;
}

/* Banner Notification Container */
.banner-notification-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Banner Notification Wrapper */
.banner-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: var(--banner-z-index);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform var(--banner-animation-duration) ease-in-out, 
                opacity var(--banner-animation-duration) ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-notification.banner-notification-visible {
    transform: translateY(0);
    opacity: 1;
}

/* Banner Content Styles */
.banner-notification-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 24px;
    width: 100%;
}

/* Banner Icon Wrapper */
.banner-notification-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 2px;
}

.banner-notification-icon {
    width: 100%;
    height: 100%;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Banner Body */
.banner-notification-body {
    flex: 1;
    min-width: 0;
}

.banner-notification-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.banner-notification-message {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Banner Close Button */
.banner-notification-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
    margin-top: -2px;
}

.banner-notification-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.banner-notification-close:active {
    background: rgba(0, 0, 0, 0.12);
}

.banner-notification-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Progress Bar */
.banner-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.banner-notification-progress-bar {
    height: 100%;
    width: 100%;
    animation: banner-progress linear forwards;
    transform-origin: left;
}

@keyframes banner-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Type-Specific Styles */

/* Success Banner */
.banner-notification-success {
    background-color: var(--banner-success-bg);
    border-bottom: 3px solid var(--banner-success-border);
}

.banner-notification-success .banner-notification-icon {
    color: var(--banner-success-icon);
}

.banner-notification-success .banner-notification-title,
.banner-notification-success .banner-notification-message {
    color: var(--banner-success-text);
}

.banner-notification-success .banner-notification-close {
    color: var(--banner-success-text);
}

.banner-notification-success .banner-notification-close:hover {
    background: rgba(5, 150, 105, 0.1);
}

.banner-notification-success .banner-notification-progress-bar {
    background-color: var(--banner-success-icon);
    opacity: 0.6;
}

/* Error Banner */
.banner-notification-error {
    background-color: var(--banner-error-bg);
    border-bottom: 3px solid var(--banner-error-border);
}

.banner-notification-error .banner-notification-icon {
    color: var(--banner-error-icon);
}

.banner-notification-error .banner-notification-title,
.banner-notification-error .banner-notification-message {
    color: var(--banner-error-text);
}

.banner-notification-error .banner-notification-close {
    color: var(--banner-error-text);
}

.banner-notification-error .banner-notification-close:hover {
    background: rgba(220, 38, 38, 0.1);
}

.banner-notification-error .banner-notification-progress-bar {
    background-color: var(--banner-error-icon);
    opacity: 0.6;
}

/* Warning Banner */
.banner-notification-warning {
    background-color: var(--banner-warning-bg);
    border-bottom: 3px solid var(--banner-warning-border);
}

.banner-notification-warning .banner-notification-icon {
    color: var(--banner-warning-icon);
}

.banner-notification-warning .banner-notification-title,
.banner-notification-warning .banner-notification-message {
    color: var(--banner-warning-text);
}

.banner-notification-warning .banner-notification-close {
    color: var(--banner-warning-text);
}

.banner-notification-warning .banner-notification-close:hover {
    background: rgba(217, 119, 6, 0.1);
}

.banner-notification-warning .banner-notification-progress-bar {
    background-color: var(--banner-warning-icon);
    opacity: 0.6;
}

/* Info Banner */
.banner-notification-info {
    background-color: var(--banner-info-bg);
    border-bottom: 3px solid var(--banner-info-border);
}

.banner-notification-info .banner-notification-icon {
    color: var(--banner-info-icon);
}

.banner-notification-info .banner-notification-title,
.banner-notification-info .banner-notification-message {
    color: var(--banner-info-text);
}

.banner-notification-info .banner-notification-close {
    color: var(--banner-info-text);
}

.banner-notification-info .banner-notification-close:hover {
    background: rgba(59, 130, 246, 0.1);
}

.banner-notification-info .banner-notification-progress-bar {
    background-color: var(--banner-info-icon);
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-notification-content {
        gap: 12px;
        padding: 12px 16px;
    }

    .banner-notification-title {
        font-size: 14px;
    }

    .banner-notification-message {
        font-size: 13px;
    }

    .banner-notification-close {
        width: 28px;
        height: 28px;
        margin-left: 8px;
    }

    .banner-notification-close svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .banner-notification-content {
        gap: 8px;
        padding: 10px 12px;
        flex-direction: column;
    }

    .banner-notification-icon-wrapper {
        margin-top: 0;
    }

    .banner-notification-close {
        align-self: flex-end;
        margin-left: 0;
        margin-top: -28px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --banner-success-bg: #064e3b;
        --banner-success-text: #86efac;
        --banner-error-bg: #7f1d1d;
        --banner-error-text: #fca5a5;
        --banner-warning-bg: #78350f;
        --banner-warning-text: #fde68a;
        --banner-info-bg: #1e3a8a;
        --banner-info-text: #93c5fd;
    }

    .banner-notification-container {
        background: #1f2937;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    .banner-notification {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    .banner-notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .banner-notification-close:active {
        background: rgba(255, 255, 255, 0.15);
    }

    .banner-notification-progress {
        background: rgba(255, 255, 255, 0.1);
    }

    .banner-notification-success .banner-notification-close:hover {
        background: rgba(16, 185, 129, 0.15);
    }

    .banner-notification-error .banner-notification-close:hover {
        background: rgba(239, 68, 68, 0.15);
    }

    .banner-notification-warning .banner-notification-close:hover {
        background: rgba(251, 146, 60, 0.15);
    }

    .banner-notification-info .banner-notification-close:hover {
        background: rgba(59, 130, 246, 0.15);
    }
}

/* Print Styles */
@media print {
    .banner-notification {
        display: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .banner-notification {
        transition: none;
    }

    .banner-notification-progress-bar {
        animation: none;
        transform: scaleX(0);
    }

    .banner-notification-close {
        transition: none;
    }
}
