/* =========================================================================
 * SELLVIO STORE MAP WIDGET — stylesheet
 * Minden szabály egyetlen .sm-widget gyökér alól indul, hogy ne ütközzön
 * az oldal többi stílusával. Az osztály-prefix: sm-
 *
 * MEGJEGYZÉS: a property értékeken !important van, így a befogadó oldal
 * globális stílusai nem írják felül a widget kinézetét.
 * ========================================================================= */

.sm-widget,
.sm-widget *,
.sm-widget *::before,
.sm-widget *::after {
    box-sizing: border-box !important;
}

.sm-widget {
    color: #2b2b2b !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

/* -------- Vezérlősáv: kereső + legördülő + gombok -------- */
.sm-widget .sm-controls {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    align-items: flex-end !important;
    margin-bottom: 16px !important;
}

.sm-widget .sm-field {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 240px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* .sm-widget .sm-field label {
    font-weight: 600 !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    color: #151515 !important;
    line-height: 1.4 !important;
    display: block !important;
} */

.sm-widget .sm-field input,
.sm-widget .sm-field select {
    width: 100% !important;
    padding: 9px 12px !important;
    margin: 0 !important;
    border: 1px solid #bbb !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    font-family: inherit !important;
    background: #fff !important;
    color: inherit !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
    height: auto !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

/* A gomb-mező (az input/legördülő melletti) a többi mező aljához igazítja a gombot. */
.sm-widget .sm-field-btn {
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
}

/* Alap gomb-stílus. Az oldalad .button / .button--primary / .button--gray
   szabályai NEM írják felül ezeket, mert minden property !important-tel van. */
.sm-widget .button {
    padding: 9px 18px !important;
    white-space: nowrap !important;
    transition: background 0.15s, transform 0.05s !important;
}

.sm-widget .button:active {
    transform: translateY(1px) !important;
}

.sm-widget .button--primary:hover {
    background: #1976d2 !important;
}

.sm-widget .button--gray {
    background: #e8e8e8 !important;
    color: #333 !important;
}

.sm-widget .button--gray:hover {
    background: #dcdcdc !important;
}

/* -------- Térkép és info-doboz -------- */
.sm-widget .sm-map-wrapper {
    position: relative !important;
    width: 100% !important;
    margin-bottom: 18px !important;
    padding: 0 !important;
}

.sm-widget .sm-map {
    width: 100% !important;
    height: 520px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #e9e9e9 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sm-widget .sm-info-box {
    position: absolute !important;
    left: 15px !important;
    bottom: 15px !important;
    top: auto !important;
    right: auto !important;
    z-index: 20 !important;
    background: #ffffff !important;
    padding: 14px 18px 14px 16px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2) !important;
    max-width: min(360px, calc(100% - 30px)) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: #2b2b2b !important;
}

.sm-widget .sm-info-box[hidden] {
    display: none !important;
}

.sm-widget .sm-info-close {
    position: absolute !important;
    top: 4px !important;
    right: 6px !important;
    background: none !important;
    border: none !important;
    font-size: 22px !important;
    line-height: 1 !important;
    color: #888 !important;
    cursor: pointer !important;
    padding: 2px 8px !important;
    margin: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.sm-widget .sm-info-close:hover {
    color: #222 !important;
    background: #f3f3f3 !important;
}

.sm-widget .sm-info-title {
    font-weight: 700 !important;
    font-size: 15px !important;
    margin: 0 0 4px 0 !important;
    padding: 0 22px 0 0 !important;
    color: #1a1a1a !important;
    line-height: 1.35 !important;
}

.sm-widget .sm-info-address {
    font-size: 12px !important;
    color: #6b6b6b !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.45 !important;
}

.sm-widget .sm-info-row {
    font-size: 12.5px !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    line-height: 1.45 !important;
}

.sm-widget .sm-info-label {
    color: #555 !important;
    font-weight: 600 !important;
}

.sm-widget .sm-info-box a {
    color: #2196f3 !important;
    text-decoration: none !important;
    background: transparent !important;
}

.sm-widget .sm-info-box a:hover {
    text-decoration: underline !important;
}

/* -------- Táblázat -------- */
.sm-widget .sm-table-wrapper {
    width: 100% !important;
    overflow-x: auto !important;
}

.sm-widget .sm-table {
    width: 100% !important;
}

.sm-widget .sm-table tr {
    cursor: pointer;
}

.sm-widget .sm-table tr:hover {
    background-color: #ddd;
}

.sm-widget .sm-no-results {
    padding: 28px !important;
    text-align: center !important;
    color: #777 !important;
    background: #fff !important;
}

.sm-widget .sm-no-results[hidden] {
    display: none !important;
}

/* -------- Reszponzív: tablet -------- */
@media (max-width: 860px) {
    .sm-widget .sm-map {
        height: 460px !important;
    }

    .sm-widget .sm-field-btn {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    .sm-widget .sm-field-btn .button {
        width: 100% !important;
    }
}

/* -------- Reszponzív: mobil -------- */
@media (max-width: 600px) {
    .sm-widget .sm-controls {
        gap: 10px !important;
    }

    .sm-widget .sm-field {
        flex: 1 1 100% !important;
    }

    .sm-widget .sm-map {
        height: 380px !important;
    }

    .sm-widget .sm-info-box {
        left: 10px !important;
        bottom: 10px !important;
        padding: 12px 14px !important;
        max-width: calc(100% - 20px) !important;
        font-size: 12.5px !important;
    }

    /* A táblázat kártyás elrendezésre vált */
    .sm-widget .sm-table-wrapper {
        border: none !important;
        background: transparent !important;
    }

    .sm-widget .sm-table {
        background: transparent !important;
    }

    .sm-widget .sm-table thead {
        display: none !important;
    }

    .sm-widget .sm-table,
    .sm-widget .sm-table tbody,
    .sm-widget .sm-table tr,
    .sm-widget .sm-table td {
        display: block !important;
        width: 100% !important;
    }

    .sm-widget .sm-table tr {
        margin: 0 0 12px 0 !important;
        background: #fff !important;
        border: 1px solid #ececec !important;
        border-radius: 8px !important;
        padding: 6px 4px !important;
    }

    .sm-widget .sm-table td {
        border-bottom: 1px solid #f3f3f3 !important;
        padding: 8px 12px !important;
        display: flex !important;
        justify-content: space-between !important;
        gap: 12px !important;
        text-align: right !important;
    }

    .sm-widget .sm-table td:last-child {
        border-bottom: none !important;
    }

    .sm-widget .sm-table td::before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #555 !important;
        text-align: left !important;
        flex: 0 0 auto !important;
        margin-right: 8px !important;
    }
}

/* -------- Leaflet finomhangolás (a widgeten belül) -------- */
.sm-widget .leaflet-container {
    font-family: inherit !important;
    font-size: 13px !important;
    z-index: 0 !important;
}

/* Leaflet alapból akár z-index: 1000 értékeket is használ a panel- és
   kontroll-rétegekhez. A widgeten belül lecsökkentjük őket, hogy
   semmi se érje el a 99-et — a panelek relatív sorrendjét megtartva. */
.sm-widget .leaflet-pane {
    z-index: 4 !important;
}

.sm-widget .leaflet-tile-pane {
    z-index: 2 !important;
}

.sm-widget .leaflet-overlay-pane {
    z-index: 4 !important;
}

.sm-widget .leaflet-shadow-pane {
    z-index: 5 !important;
}

.sm-widget .leaflet-marker-pane {
    z-index: 6 !important;
}

.sm-widget .leaflet-tooltip-pane {
    z-index: 7 !important;
}

.sm-widget .leaflet-popup-pane {
    z-index: 8 !important;
}

.sm-widget .leaflet-map-pane canvas {
    z-index: 1 !important;
}

.sm-widget .leaflet-map-pane svg {
    z-index: 2 !important;
}

.sm-widget .leaflet-control {
    z-index: 9 !important;
}

.sm-widget .leaflet-top,
.sm-widget .leaflet-bottom {
    z-index: 10 !important;
}
