/* Kontener alertów - absolute wycentrowany w main-wrapper */
#main-wrapper {
    position: relative;
}

.flash-alerts-container {
    position: absolute !important;
    top: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1050 !important;
    width: 70%;
    max-width: 1000px;
    min-width: 600px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Alerty w kontenerze - wszystkie style w jednym miejscu */
.flash-alerts-container .alert {
    /* Pozycjonowanie */
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: auto !important;

    /* Wymiary */
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;

    /* Odstępy */
    margin: 0 !important;
    padding: 1rem !important;

    /* Wygląd */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;

    /* Interakcja */
    pointer-events: auto;

    /* Stan domyślny - ukryty */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-20px) !important;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out, transform 0.4s ease-out !important;
}

.flash-alerts-container .alert.alert-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Alert zamykający się */
.flash-alerts-container .alert.alert-closing {
    opacity: 0 !important;
    transform: translateY(-30px) !important;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out !important;
}


/* Pasek postępu czasu do zamknięcia */
.alert-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Ciemniejszy pasek postępu dla jasnych alertów (info, warning) */
.alert-info .alert-progress-bar {
    background: rgba(0, 0, 0, 0.4);
}

.alert-warning .alert-progress-bar {
    background: rgba(0, 0, 0, 0.3);
}

/* Biały pasek dla ciemnych alertów (success, danger) */
.alert-success .alert-progress-bar,
.alert-danger .alert-progress-bar {
    background: rgba(255, 255, 255, 0.7);
}

/* Responsywność dla małych ekranów */
@media (max-width: 992px) {
    .flash-alerts-container {
        width: 70%;
        min-width: 400px;
    }
}

@media (max-width: 576px) {
    .flash-alerts-container {
        width: 90%;
        min-width: auto;
        max-width: 90%;
        top: 60px !important;
    }
}
