/* Azure Portal-style Notification System */

.status-banners-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    max-width: 420px;
    width: 100%;
    pointer-events: none;
}

.status-banner {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 4px;
    border-left: 4px solid;
    font-size: 14px;
    line-height: 20px;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
}

/* Type-specific styling */
.status-banner-success {
    border-left-color: #107c10;
}

.status-banner-success .status-icon {
    color: #107c10;
}

.status-banner-warning {
    border-left-color: #ffb900;
}

.status-banner-warning .status-icon {
    color: #ff8c00;
}

.status-banner-error {
    border-left-color: #d13438;
}

.status-banner-error .status-icon {
    color: #d13438;
}

.status-banner-info {
    border-left-color: #0078d4;
}

.status-banner-info .status-icon {
    color: #0078d4;
}

.status-content {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.status-icon {
    margin-right: 12px;
    margin-top: 2px;
    font-size: 16px;
    flex-shrink: 0;
}

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

.status-title {
    font-weight: 600;
    color: #323130;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.status-message {
    color: #605e5c;
    line-height: 1.4;
    word-wrap: break-word;
}

.status-time {
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.7;
}

.status-dismiss {
    background: none;
    border: none;
    color: #605e5c;
    cursor: pointer;
    padding: 4px;
    margin-left: 12px;
    margin-top: -2px;
    border-radius: 2px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.status-dismiss:hover {
    color: #323130;
    background-color: rgba(96, 94, 92, 0.1);
}

.status-dismiss:focus {
    outline: 2px solid #0078d4;
    outline-offset: 1px;
}

/* Auto-dismiss progress bar */
.status-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.1);
}

.status-progress-bar {
    height: 100%;
    background-color: currentColor;
    opacity: 0.3;
    width: 100%;
    transform-origin: left;
}

.status-banner-success .status-progress-bar {
    background-color: #107c10;
}

.status-banner-warning .status-progress-bar {
    background-color: #ff8c00;
}

.status-banner-error .status-progress-bar {
    background-color: #d13438;
}

.status-banner-info .status-progress-bar {
    background-color: #0078d4;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes progress-countdown {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .status-banners-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .status-banner {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .status-icon {
        margin-right: 8px;
    }
    
    .status-title {
        font-size: 13px;
    }
    
    .status-message {
        font-size: 13px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .status-banner {
        border-width: 2px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .status-title {
        color: #000000;
    }
    
    .status-message {
        color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .status-banner {
        animation: none;
    }
    
    .status-progress-bar {
        animation: none;
    }
    
    .status-dismiss {
        transition: none;
    }
}

/* Focus management for accessibility */
.status-banner:focus-within {
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}

/* Ensure text remains readable on all backgrounds */
.status-banner {
    color: #323130;
}

/* Smooth exit animation when dismissed */
.status-banner.dismissing {
    animation: slideOutRight 0.3s ease-in-out forwards;
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 200px;
        margin-bottom: 12px;
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}