/* =========================================
   МОДУЛЬ: ПОГОДА (Gismeteo v4)
   Префикс: wm- (Weather Module)
   ========================================= */

/* --- 1. Бегущая строка (Ticker) --- */
.wm-ticker {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #0369a1 0%, #0ea5e9 100%);
    color: white;
    padding: 8px 0;
    overflow: hidden;
    position: relative;
    z-index: 1000;
    font-size: 14px;
    line-height: 1.4;
}

.wm-ticker-container {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.wm-ticker-track {
    display: inline-block;
    padding-left: 100%;
    animation: wm-scroll 40s linear infinite;
    will-change: transform;
}

.wm-ticker.wm-paused .wm-ticker-track,
.wm-ticker:hover .wm-ticker-track {
    animation-play-state: paused;
}

@keyframes wm-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.wm-segment {
    display: inline-flex;
    align-items: center;
}

.wm-item {
    display: inline-block;
    padding: 0 12px;
    white-space: nowrap;
}

.wm-divider {
    opacity: 0.5;
    margin: 0 4px;
}

.wm-control {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 4px 10px;
    margin: 0 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.wm-control:hover {
    background: rgba(255,255,255,0.3);
}

.wm-icon {
    vertical-align: middle;
    width: 20px;
    height: auto;
    margin-right: 4px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* --- 2. Баннер предупреждений (Banner) --- */
.wm-banner {
    margin: 10px 0;
}

.wm-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

.wm-card.wm-danger {
    background: #fef2f2;
    border-left: 5px solid #dc2626;
    color: #991b1b;
}

.wm-card.wm-warning {
    background: #fffbeb;
    border-left: 5px solid #d97706;
    color: #92400e;
}

.wm-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.wm-banner-icon img {
    width: 100%;
    height: auto;
}

.wm-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.wm-text {
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.wm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.wm-chip {
    background: rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.wm-note {
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.4;
}

.wm-note a {
    color: inherit;
    text-decoration: underline;
}

.wm-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    color: inherit;
}

.wm-close:hover {
    opacity: 1;
}

/* --- 3. Адаптивность для мобильных --- */
@media (max-width: 768px) {
    .wm-ticker {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .wm-item {
        padding: 0 8px;
    }
    
    .wm-icon {
        width: 16px;
    }
    
    .wm-control {
        padding: 4px 8px;
        margin: 0 4px;
        font-size: 12px;
    }
    
    .wm-ticker-track {
        animation-duration: 30s; /* Чуть быстрее на маленьких экранах */
    }
    
    .wm-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .wm-chips {
        justify-content: center;
    }
}