/* ═══════════════════════════════════════════
   Sandžakhaber Pro — Mapa Vesti
   ═══════════════════════════════════════════ */

/* Wrap */
.shp-map-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 1rem 0;
}

.shp-map-container {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

/* Header */
.shp-map-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 16px 20px;
    color: #fff;
}
.shp-map-title {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
.shp-map-subtitle {
    margin: 0;
    font-size: .85rem;
    color: rgba(255,255,255,.7);
}

/* Body */
.shp-map-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
    align-items: start;
}

/* SVG */
.shp-svg-wrap {
    padding: 16px;
    background: #f8fffe;
}
.shp-svg {
    width: 100%;
    max-width: 340px;
    height: auto;
    display: block;
}

/* City pins hover */
.shp-city-pin {
    transition: transform .2s;
    transform-origin: center;
}
.shp-city-pin:hover {
    transform: scale(1.3);
}
.shp-city-pin.active circle:last-of-type {
    stroke-width: 1.5;
    r: 3;
}

/* Cities list */
.shp-cities-list {
    padding: 16px 16px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.shp-city-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 500;
    color: #374151;
    transition: all .15s;
    white-space: nowrap;
    font-family: inherit;
}
.shp-city-btn:hover {
    border-color: var(--city-color);
    color: var(--city-color);
    background: color-mix(in srgb, var(--city-color) 8%, white);
    transform: translateX(2px);
}
.shp-city-btn.active {
    background: var(--city-color);
    border-color: var(--city-color);
    color: #fff;
}

.shp-city-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Posts panel */
.shp-posts-panel {
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.shp-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.shp-panel-city-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}
.shp-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s;
    font-family: inherit;
}
.shp-panel-close:hover { color: #374151; }

/* Posts grid */
.shp-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    padding: 16px 20px;
}

.shp-post-item {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .15s;
}
.shp-post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.shp-post-thumb {
    width: 80px;
    min-height: 80px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.shp-no-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.shp-post-info {
    padding: 10px 10px 10px 0;
    flex: 1;
    min-width: 0;
}
.shp-post-date {
    font-size: .75rem;
    color: #9ca3af;
    display: block;
    margin-bottom: 4px;
}
.shp-post-title {
    margin: 0 0 4px;
    font-size: .85rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shp-post-excerpt {
    margin: 0;
    font-size: .78rem;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shp-loading {
    color: #9ca3af;
    font-size: .9rem;
    text-align: center;
    padding: 20px;
    grid-column: 1/-1;
}

.shp-no-posts {
    color: #9ca3af;
    font-size: .9rem;
    text-align: center;
    padding: 20px;
    grid-column: 1/-1;
    margin: 0;
}

/* ═══════════════════════════════════════════
   FLOATING DUGME
   ═══════════════════════════════════════════ */

.shp-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: #fff;
    font-size: 1.4rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    z-index: 9998;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shp-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0,0,0,.3);
}

.shp-floating-panel {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: min(600px, calc(100vw - 48px));
    max-height: 80vh;
    overflow-y: auto;
    z-index: 9997;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
}

.shp-floating-panel-inner {
    position: relative;
}

.shp-floating-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-family: inherit;
}
.shp-floating-close:hover {
    background: rgba(255,255,255,.35);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 600px) {
    .shp-map-body {
        grid-template-columns: 1fr;
    }
    .shp-cities-list {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 8px 16px 12px;
    }
    .shp-city-btn {
        font-size: .8rem;
        padding: 6px 10px;
    }
    .shp-posts-grid {
        grid-template-columns: 1fr;
    }
    .shp-floating-panel {
        bottom: 0;
        right: 0;
        width: 100vw;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
    }
}

/* ═══════════════════════════════════════════
   SPORT WIDGET
   ═══════════════════════════════════════════ */
.shp-sport-wrap {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.shp-sport-header {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    padding: 12px 16px;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.shp-sport-live {
    font-size: .75rem;
    color: #e63946;
    font-weight: 700;
    animation: shp-blink 1.5s infinite;
}
@keyframes shp-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}
.shp-sport-teams { padding: 8px 0; }
.shp-team-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-left: 3px solid var(--team-color);
    margin: 4px 0;
    transition: background .15s;
}
.shp-team-row:hover { background: #f9fafb; }
.shp-team-emoji { font-size: 1.1rem; }
.shp-team-name { flex: 1; font-size: .9rem; font-weight: 600; color: #111827; }
.shp-team-link {
    font-size: .8rem;
    color: var(--team-color);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}
.shp-team-link:hover { text-decoration: underline; }
.shp-sport-news { border-top: 1px solid #e5e7eb; padding: 8px 0; }
.shp-sport-news-title {
    padding: 6px 16px;
    font-size: .8rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.shp-sport-item {
    display: flex;
    gap: 10px;
    padding: 7px 16px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
    align-items: flex-start;
}
.shp-sport-item:hover { background: #f9fafb; }
.shp-sport-date {
    font-size: .78rem;
    color: #9ca3af;
    white-space: nowrap;
    margin-top: 2px;
    flex-shrink: 0;
}
.shp-sport-item-title {
    font-size: .85rem;
    color: #111827;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════
   CHATBOT MOBILE
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
    #shp-chat-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 85vh !important;
        border-radius: 20px 20px 0 0 !important;
        z-index: 9999 !important;
    }
    #shp-chat-btn {
        bottom: 20px !important;
        left: 16px !important;
        width: 48px !important;
        height: 48px !important;
    }
    #shp-push-btn {
        bottom: 80px !important;
        left: 16px !important;
        font-size: .8rem !important;
        padding: 8px 12px !important;
    }
    .shp-floating-btn {
        bottom: 20px !important;
        right: 16px !important;
        width: 48px !important;
        height: 48px !important;
    }
}
