/* --- Блокування екрану для Хвилини мовчання --- */
#uamos-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95); 
    z-index: 9999999; 
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    backdrop-filter: blur(5px);
}

.uamos-content {
    max-width: 600px;
    padding: 20px;
}

.uamos-content h2 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.uamos-timer {
    font-size: 48px;
    font-family: monospace;
    margin: 30px 0;
    color: #ffcc00; 
}

.uamos-progress-container {
    width: 100%;
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.uamos-progress-bar {
    height: 100%;
    background-color: #0057b7; 
    width: 0%;
    transition: width 0.5s linear;
}

/* Кнопка увімкнення звуку */
#uamos-unmute-btn {
    background-color: #ffcc00;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}

#uamos-unmute-btn:hover {
    background-color: #e6b800;
}

/* --- Віджет Дня жалоби --- */
#uamos-mourning-badge {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: rgba(26,26,26,.9);
    color: #ddd;
    padding: 15px 35px 15px 20px; 
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 999998;
    border-left: 4px solid #555;
    max-width: 450px;
    
    /* Ховаємо за замовчуванням, щоб не було миготіння */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(20px); /* Трохи опущена вниз */
    transition: opacity 0.5s ease, transform 0.5s ease, background-color 0.3s ease;
}

/* Клас, який додає JS для плавної появи плашки */
#uamos-mourning-badge.uamos-show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#uamos-mourning-badge:hover {
    background-color: #000;
    color: #fff;
    transform: translateY(-2px); /* Цей ефект спрацює тільки якщо плашка uamos-show */
}

/* Кнопка закриття плашки (Хрестик) */
#uamos-mourning-close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 18px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s;
}

#uamos-mourning-close:hover {
    color: #ff4c4c; 
}

.uamos-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0; 
}

.uamos-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    word-wrap: break-word; 
}

.uamos-link-arrow {
    display: inline-block;
    margin-left: 6px;
    color: #aeb4b7;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.uamos-link-arrow:hover {
    color: #ffcc00; 
    transform: translate(2px, -2px); 
}

/* --- ІНТЕГРАЦІЯ З КНОПКОЮ SCROLL TOP --- */

#scroll-top {
    transition: bottom 0.3s ease, opacity 0.3s ease !important;
}

/* Використовуємо динамічно вирахувану висоту (за замовчуванням 120px) */
body.has-mourning-badge #scroll-top {
    bottom: var(--uamos-badge-offset, 120px) !important; 
    right: 30px !important;
}

@media (max-width: 600px) {
    #uamos-mourning-badge {
        bottom: 0;
        right: 0;
        width: 100%;
        max-width: 100%; 
        border-radius: 0;
        justify-content: center;
        padding-right: 40px; 
    }
    .uamos-content h2 {
        font-size: 24px;
    }
    #uamos-mourning-close {
        top: 10px;
        right: 15px;
        font-size: 20px;
    }
}