/* css/notifications.css - Ulepszony wygląd */

#notifications-area {
    position: fixed;
    top: 12px; /* Trochę niżej od góry dla lepszego wyglądu */
    left: 50%;
    transform: translateX(-50%);
    width: 90%; /* Dostosowanie szerokości */
    max-width: 360px; /* Maksymalna szerokość */
    background: rgba(34, 40, 49, 0.65); /* Tło glassmorphism */
    color: #e0e0e0; /* Główny kolor tekstu */
    padding: 10px 14px; /* Więcej wewnętrznego marginesu */
    border-radius: 10px; /* Bardziej zaokrąglone rogi */
    z-index: 10000;             /* Upewnij się, że jest na wierzchu */
    text-align: left; /* Wyrównanie do lewej dla lepszej czytelności listy */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); /* Cień dla glassmorphism */
    font-size: 0.88em; /* Nieco większa czcionka dla czytelności */
    display: none; /* Domyślnie ukryte, JavaScript pokaże gdy będą powiadomienia */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Ramka dla glassmorphism */
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    /* position: relative;  Jeśli #notifications-area nie jest 'fixed' lub 'absolute', to jest potrzebne dla pozycjonowania potomka */
}

#notifications-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#notifications-area li {
    padding: 6px 0; /* Zwiększony padding dla elementów listy */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtelny separator */
    line-height: 1.5; /* Lepsza czytelność tekstu wieloliniowego */
}

#notifications-area li:last-child {
    border-bottom: none; /* Usuń separator dla ostatniego elementu */
}
#notifications-area a {
    color: var(--accent-yellow, #fee300); /* Kolor linków zgodny z akcentem */
    text-decoration: none;
    font-weight: 500; /* Lekko pogrubione linki, aby się wyróżniały */
    transition: color 0.2s ease;
}

#notifications-area a:hover,
#notifications-area a:focus { /* Dodano :focus dla dostępności */
    color: var(--accent-yellow-hover, #fffb8f); /* Jaśniejszy żółty przy hover */
}

/* Styl dla przycisku zamykania powiadomień */
.notification-close-btn {
    position: absolute;
    top: 6px; /* Dopasuj pozycję góra/prawo */
    right: 10px;
    font-size: 1.2em; /* Większy 'x' */
    font-weight: bold;
    color: #b0b0b0; /* Jaśniejszy szary dla lepszej widoczności */
    cursor: pointer;
    line-height: 1;
    padding: 0 2px; /* Dodatkowy padding dla łatwiejszego kliknięcia */
    transition: color 0.2s ease-in-out;
}
.notification-close-btn:hover {
    color: #ffffff; /* Biały przy najechaniu */
}

/* Opcjonalnie: Dodanie animacji pojawiania się.
   Aby to zadziałało, musiałbyś w JavaScript (np. w funkcji displayAdminNotifications)
   dodawać klasę 'show' do elementu #notifications-area, gdy jest on pokazywany,
   i usuwać ją, gdy jest ukrywany.
*/
/*
#notifications-area.show {
    animation: fadeInTop 0.4s ease-out forwards;
}

@keyframes fadeInTop {
    from {
        opacity: 0;
        transform: translate(-50%, -15px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}
*/

#notifications-area li.error { color: #d32f2f; font-weight: bold; }
#notifications-area li.success { color: #49f300; font-weight: bold; }
#notifications-area li.info { color: #fee300; }
#notifications-area li.warning { color: #ff9800; font-weight: bold; }
/* Kompaktowy banner cookies */
#cookie-consent-banner {
    display: none;
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 40, 49, 0.7); /* Tło glassmorphism dla banera cookie */
    color: #e0e0e0; /* Główny kolor tekstu */
    padding: 10px 12px 8px 12px;
    border-radius: 10px; /* Zaokrąglenie */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); /* Cień */
    z-index: 9999;
    max-width: 320px;
    width: 96vw;
    font-size: 0.93em;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.15); /* Ramka */
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
}
#cookie-consent-banner > div:first-child {
    margin-bottom: 7px;
}
#cookie-consent-banner a,
#cookie-consent-banner button {
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.97em;
    margin: 0 2px 2px 0;
    min-width: 0;
    min-height: 0;
    line-height: 1.2;
}
#cookie-consent-banner button {
    border: 1px solid #fee300;
    background: #232d3a;
    color: #fee300;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
#cookie-consent-banner button:hover {
    background: #fee300;
    color: #232d3a;
}
#cookie-consent-banner a {
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
#cookie-consent-banner a[href*="cookies"] {
    background: #fee300;
    color: #232d3a;
}
#cookie-consent-banner a[href*="privacy"] {
    background: #49f300;
    color: #232d3a;
}
#cookie-consent-banner a:hover {
    opacity: 0.92;
}

/* --- Nowe centrum powiadomień + Web Push --- */
#notifications-area {
    top: 14px;
    right: 16px;
    left: auto;
    transform: none;
    width: min(390px, calc(100vw - 24px));
    max-width: none;
    display: none;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
}

#notifications-area.show,
#notifications-area.has-items {
    display: grid;
}

#notifications-area > ul,
#notifications-area > .notification-close-btn {
    pointer-events: auto;
}

.tt-toast {
    pointer-events: auto;
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 14px;
    border-radius: 16px;
    color: #f5f7fb;
    background:
        radial-gradient(130% 160% at 0% 0%, rgba(196, 255, 44, 0.08), transparent 42%),
        rgba(16, 22, 32, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px) saturate(165%);
    -webkit-backdrop-filter: blur(14px) saturate(165%);
    animation: ttToastIn 0.25s ease-out both;
}

.tt-toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fee300;
}

.tt-toast-body {
    min-width: 0;
    line-height: 1.45;
    font-size: 0.92rem;
}

.tt-toast-title {
    display: block;
    margin-bottom: 3px;
    font-weight: 800;
    color: #fff;
}

.tt-toast-close {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.68);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    padding: 2px 3px;
    transition: color 0.18s ease, transform 0.18s ease;
}

.tt-toast-close:hover {
    color: #fff;
    transform: scale(1.08);
}

.tt-toast.success .tt-toast-icon { color: #77ff6a; }
.tt-toast.warning .tt-toast-icon { color: #ffbf47; }
.tt-toast.error .tt-toast-icon { color: #ff6b6b; }
.tt-toast.info .tt-toast-icon { color: #62ddff; }
.tt-toast.success { border-color: rgba(119, 255, 106, 0.22); }
.tt-toast.warning { border-color: rgba(255, 191, 71, 0.28); }
.tt-toast.error { border-color: rgba(255, 107, 107, 0.28); }
.tt-toast.info { border-color: rgba(98, 221, 255, 0.22); }

@keyframes ttToastIn {
    from { opacity: 0; transform: translateX(16px) translateY(-8px); }
    to { opacity: 1; transform: translateX(0) translateY(0); }
}

.tt-push-panel {
    background:
        radial-gradient(140% 150% at 0% 0%, rgba(196, 255, 44, 0.08), transparent 42%),
        radial-gradient(120% 150% at 100% 0%, rgba(72, 196, 255, 0.09), transparent 36%),
        rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 18px;
}

.tt-push-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
    gap: 16px;
    align-items: stretch;
}

.tt-push-hero h2 {
    margin-top: 0;
}

.tt-push-hero p,
.tt-push-note {
    color: var(--text-secondary, #b8c0cc);
    line-height: 1.6;
}

.tt-push-status-card {
    display: grid;
    gap: 8px;
    align-content: center;
    padding: 15px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.tt-push-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #8992a3;
    box-shadow: 0 0 0 5px rgba(137, 146, 163, 0.14);
}

.tt-push-status-card.is-good .tt-push-status-dot {
    background: #77ff6a;
    box-shadow: 0 0 0 5px rgba(119, 255, 106, 0.16);
}

.tt-push-status-card.is-warn .tt-push-status-dot {
    background: #ffbf47;
    box-shadow: 0 0 0 5px rgba(255, 191, 71, 0.16);
}

.tt-push-status-card.is-error .tt-push-status-dot {
    background: #ff6b6b;
    box-shadow: 0 0 0 5px rgba(255, 107, 107, 0.16);
}

.tt-push-status-card small {
    color: var(--text-secondary, #b8c0cc);
    line-height: 1.45;
}

.tt-push-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.tt-notification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.tt-notification-toggle {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px;
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
}

.tt-notification-toggle input {
    margin-top: 4px;
    accent-color: var(--accent, #c4ff2c);
}

.tt-notification-toggle strong {
    display: block;
    color: var(--text-primary, #fff);
    margin-bottom: 4px;
}

.tt-notification-toggle small {
    display: block;
    color: var(--text-secondary, #b8c0cc);
    line-height: 1.45;
}

.tt-quiet-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.tt-quiet-row label:not(.tt-notification-toggle) {
    color: var(--text-secondary, #b8c0cc);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tt-quiet-row input[type="time"] {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-primary, #fff);
    border-radius: 10px;
    padding: 8px 10px;
}

.tt-quiet-toggle {
    flex: 1 1 270px;
}

.tt-push-note {
    margin: 12px 0 0;
    font-size: 0.92rem;
}

@media (max-width: 760px) {
    #notifications-area {
        top: 10px;
        right: 8px;
        left: 8px;
        width: auto;
    }
    .tt-push-hero {
        grid-template-columns: 1fr;
    }
}
