/* ==============================================================================
 * Cenerentola - Interactive Yandex Metro Map Styles
 * ============================================================================== */

.cenerentola-metro-map-section {
    position: relative;
    width: 100%;
    margin-bottom: 45px;
    font-family: inherit;
}

.cenerentola-metro-map-section * {
    box-sizing: border-box;
}

.cenerentola-metro-map-wrapper {
    display: flex;
    flex-direction: row;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e7eaec;
    overflow: hidden;
    position: relative;
    min-height: 600px;
}

/* Map area */
.cenerentola-map-container {
    flex: 1 1 auto;
    position: relative;
    min-width: 0;
    min-height: 600px;
    background: #f2f2f2;
}

#cenerentola-yandex-map {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

/* Filter overlay on map */
.cenerentola-map-filter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    max-width: 90%;
}

.cenerentola-metro-select {
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    background: #fff;
    color: #2c3e50;
    cursor: pointer;
    min-width: 220px;
    max-width: 280px;
    outline: none;
    transition: border-color 0.2s;
}

.cenerentola-metro-select:focus {
    border-color: #227989;
}

.cenerentola-metro-search-btn {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    background: #227989;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}

.cenerentola-metro-search-btn:hover {
    background: #1a5e6b;
}

.cenerentola-metro-search-btn:active {
    transform: scale(0.98);
}

/* Sidebar */
.cenerentola-map-sidebar {
    width: 360px;
    max-width: 100%;
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
    background: #fafbfc;
    border-left: 1px solid #e7eaec;
    position: relative;
    max-height: 600px;
}

.cenerentola-sidebar-header {
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #edf1f3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cenerentola-sidebar-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.cenerentola-sidebar-count {
    font-size: 12px;
    color: #8c9ba5;
    background: #f0f4f7;
    padding: 3px 8px;
    border-radius: 12px;
}

.cenerentola-sidebar-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Station Card */
.cenerentola-station-card {
    background: #ffffff;
    border: 1px solid #e7eaec;
    border-radius: 8px;
    padding: 14px 16px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
    position: relative;
}

.cenerentola-station-card:hover {
    border-color: #227989;
    box-shadow: 0 4px 14px rgba(34, 121, 137, 0.12);
    transform: translateY(-1px);
}

.cenerentola-station-card.is-active {
    border-color: #227989;
    background: #f4fafb;
    box-shadow: 0 0 0 2px rgba(34, 121, 137, 0.2);
}

.cenerentola-station-name-link {
    font-size: 16px;
    font-weight: 600;
    color: #1a252f;
    text-decoration: underline;
    display: inline-block;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.cenerentola-station-name-link:hover {
    color: #227989;
}

.cenerentola-station-line {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.cenerentola-station-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.cenerentola-station-desc {
    font-size: 13px;
    color: #718096;
    margin-bottom: 5px;
}

.cenerentola-station-distance {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 5px;
}

.cenerentola-station-distance b {
    color: #227989;
    font-weight: 600;
}

.cenerentola-station-phone {
    font-size: 13px;
    color: #4a5568;
}

.cenerentola-station-phone a {
    color: #227989;
    font-weight: 600;
    text-decoration: none;
}

.cenerentola-station-phone a:hover {
    text-decoration: underline;
}

/* Sidebar Footer */
.cenerentola-sidebar-footer {
    padding: 14px 16px;
    background: #ffffff;
    border-top: 1px solid #edf1f3;
}

.cenerentola-btn-all-stations {
    display: block;
    width: 100%;
    text-align: center;
    padding: 11px 16px;
    background: #227989;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.cenerentola-btn-all-stations:hover {
    background: #1a5e6b;
    color: #ffffff;
}

/* Balloon styles */
.cenerentola-balloon {
    padding: 6px 4px 4px;
    font-family: inherit;
    min-width: 200px;
    max-width: 260px;
}

.cenerentola-balloon-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.25;
}

.cenerentola-balloon-line {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.cenerentola-balloon-dist {
    font-size: 12px;
    color: #374151;
    margin-bottom: 6px;
}

.cenerentola-balloon-phone {
    font-size: 12px;
    color: #227989;
    font-weight: 600;
    margin-bottom: 10px;
}

.cenerentola-balloon-phone a {
    color: #227989;
    text-decoration: none;
}

.cenerentola-balloon-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #227989;
    color: #ffffff !important;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}

.cenerentola-balloon-btn:hover {
    background: #1a5e6b;
    color: #ffffff !important;
}

/* Custom Clusterer Icons */
.cenerentola-cluster-icon {
    background-color: #227989;
    border: 3px solid #ffffff;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 991px) {
    .cenerentola-metro-map-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    .cenerentola-map-container {
        display: flex;
        flex-direction: column;
        min-height: auto;
        height: auto;
        position: relative;
    }

    /* Move search filter block ABOVE map on mobile so it never obscures balloon info */
    .cenerentola-map-filter {
        order: 1;
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px 16px;
        background: #ffffff;
        border-bottom: 1px solid #e7eaec;
        border-radius: 0;
        box-shadow: none;
        z-index: 10;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #cenerentola-yandex-map {
        order: 2;
        width: 100%;
        min-height: 440px;
        height: 440px;
    }

    .cenerentola-map-sidebar {
        width: 100%;
        flex: 1 1 auto;
        max-height: 380px;
        border-left: none;
        border-top: 1px solid #e7eaec;
    }

    .cenerentola-metro-select {
        min-width: 0;
        flex: 1;
    }
}

@media (max-width: 576px) {
    #cenerentola-yandex-map {
        min-height: 380px;
        height: 380px;
    }

    .cenerentola-map-filter {
        padding: 10px 12px;
        gap: 8px;
    }

    .cenerentola-metro-select {
        padding: 9px 10px;
        font-size: 14px;
    }

    .cenerentola-metro-search-btn {
        padding: 9px 16px;
        font-size: 14px;
    }
}
