.rink-search {
    border: 1px solid #d9e4f1;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 12px 28px rgba(20, 56, 94, 0.08);
    padding: 16px 18px 6px;
}

.rink-search .form-group {
    margin-bottom: 14px;
}

.rink-search .form-group label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #4d657d;
    margin-bottom: 6px;
}

.rink-search .form-control {
    height: 44px;
    border-radius: 10px;
    border-color: #c8d8ea;
    box-shadow: none;
    font-size: 14px;
    color: #17324f;
}

.rink-search .form-control:focus {
    border-color: #2b78c5;
    box-shadow: 0 0 0 3px rgba(43, 120, 197, 0.16);
}

#location {
    border-radius: 10px;
}

.rink-search-main-row {
    display: flex;
    align-items: flex-end;
}

.rink-search-mode-row {
    margin-bottom: 10px;
    text-align: center;
}

.rink-search-mode-row .col-md-12 {
    display: flex;
    justify-content: center;
}

.action-block-row {
    margin-left: -6px;
    margin-right: -6px;
}

.action-block-row > [class*="col-"] {
    padding-left: 6px;
    padding-right: 6px;
}

#action-block .form-group {
    margin-bottom: 14px;
}

#action-block #search-btn {
    margin-top: 24px;
}

.mode-slider-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

@media (min-width: 992px) {
    .rink-search-main-row {
        justify-content: center;
        align-items: flex-end;
        gap: 14px;
        flex-wrap: nowrap;
    }

    #location-block,
    #action-block {
        float: none;
        display: flex;
        flex-direction: column;
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }

    #action-block {
        justify-content: initial;
    }

    #location-block .input-group {
        width: 300px;
    }

    #location-block .form-group,
    #action-block .form-group {
        margin-bottom: 0;
    }

    .action-block-row {
        display: flex;
        align-items: flex-end;
        gap: 14px;
        margin: 0;
    }

    .action-block-row > [class*="col-"] {
        float: none;
        width: auto;
        padding-left: 0;
        padding-right: 0;
    }

    #radius-col {
        flex: 0 0 auto;
    }

    #radius {
        width: 105px;
        min-width: 105px;
        padding-left: 6px;
        padding-right: 6px;
    }

    #action-block #search-btn {
        width: 150px;
        margin-top: 0;
    }
}

.mode-slider-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4d657d;
}

.mode-slider-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border: 1px solid #d7e2ef;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 -1px 0 rgba(13, 63, 112, 0.05);
}

.mode-switch-label {
    font-size: 12px;
    font-weight: 700;
    color: #71879d;
    line-height: 1;
}

.mode-switch-label.active {
    color: #0e5aa7;
}

.mode-slider-control .hc-switch {
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 5.25em;
    height: 2em;
    margin: 0;
    vertical-align: middle;
}

.mode-slider-control .hc-switch input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.mode-slider-control .hc-slider {
    position: absolute;
    display: block;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #007bff;
    border: 1px solid #007bff;
    border-radius: 30px;
    transition: .4s;
    box-sizing: border-box;
}

.mode-slider-control .hc-slider:before {
    position: absolute;
    content: "";
    display: block;
    height: 1.4em;
    width: 1.4em;
    left: 0.27em;
    bottom: 0.25em;
    border-radius: 20px;
    background-color: #fff;
    transition: .4s;
}

.mode-slider-control .hc-switch input:checked + .hc-slider {
    background-color: #007bff;
    border-color: #007bff;
}

.mode-slider-control .hc-switch input:checked + .hc-slider:before {
    transform: translateX(calc(5.25em - 1.4em - 0.54em));
    background-color: #fff;
}

.mode-slider-control .hc-switch input:focus + .hc-slider {
    box-shadow: 0 0 0 3px rgba(43, 120, 197, 0.16);
}

.location-helper-row {
    margin-top: 6px;
}

.location-helper-row .col-md-12 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.location-helper-row #smart-suggestions,
.location-helper-row #location-error {
    width: 300px;
    max-width: 100%;
}

#search-btn {
    height: 44px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: #0e5aa7;
    border-color: #0e5aa7;
}

#search-btn:hover,
#search-btn:focus {
    background: #0a467f;
    border-color: #0a467f;
}

.search-inline-error {
    margin-top: 6px;
    color: #a94442;
    font-size: 12px;
    font-weight: 600;
}

.rinks-search-content {
    min-height: 280px;
    margin-top: 14px;
}

.results-sort-note {
    margin-top: 6px;
    color: #6c7f92;
    font-size: 12px;
}

.rink-card-col {
    margin-bottom: 20px;
}

.rink-result-card {
    border: 1px solid #d9e4f1;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(20, 56, 94, 0.08);
    transition: transform .18s ease, box-shadow .18s ease;
    margin-bottom: 0;
    background: #fff;
}

.rink-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(20, 56, 94, 0.14);
}

.rink-result-card-active {
    border-color: #0e5aa7;
    box-shadow: 0 0 0 2px rgba(14, 90, 167, 0.22), 0 14px 28px rgba(20, 56, 94, 0.14);
}

.rink-result-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.rink-result-link:hover,
.rink-result-link:focus {
    color: inherit;
    text-decoration: none;
}

.rink-result-image-wrap {
    position: relative;
    background: #eef3f9;
}

.rink-result-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #f7fafd;
    padding: 8px;
}

.rink-result-meta {
    padding: 12px 14px 14px;
    min-height: 86px;
}

.rink-result-title {
    display: block;
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #17324f;
}

.rink-result-location {
    color: #5f7388;
    font-size: 13px;
}

.rink-affiliation-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em;
    color: #fff;
    background: rgba(28, 39, 54, 0.82);
}

.rink-map-unavailable-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em;
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffe08a;
}

.smart-suggestions {
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    margin-top: 6px;
    background: #fff;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(20, 56, 94, 0.11);
}

.smart-suggest-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6f8399;
    padding: 7px 10px 5px;
    background: #f8fbff;
}

.smart-suggest-item {
    width: 100%;
    text-align: left;
    border: 0;
    border-top: 1px solid #eef3f9;
    background: #fff;
    padding: 9px 10px;
    font-size: 13px;
    color: #17324f;
    cursor: pointer;
}

.smart-suggest-item:hover,
.smart-suggest-item:focus {
    background: #edf5ff;
    outline: none;
}

.load-more {
    padding: 6px 0 2px;
}

.rink-search-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 4px;
    padding: 10px 12px;
    border: 1px solid #d9e4f1;
    border-radius: 12px;
    background: #f9fcff;
}

.rink-search-top em {
    font-style: normal;
    font-size: 14px;
    font-weight: 700;
    color: #17324f;
}

.rink-search-top .rink-search-showing {
    text-align: right;
    float: none !important;
}

.results-view-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: center;
    padding: 5px 10px;
    border: 1px solid #cadced;
    border-radius: 999px;
    background: #fff;
}

.results-view-label {
    font-size: 12px;
    font-weight: 600;
    color: #7b8da0;
    line-height: 1;
}

.results-view-label.active {
    color: #0e5aa7;
}

.results-view-switch.hc-switch {
    font-size: 14px;
    position: relative;
    display: inline-block;
    width: 3.8em;
    height: 1.85em;
    margin: 0;
    vertical-align: middle;
}

.results-view-switch.hc-switch input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.results-view-switch .hc-slider {
    position: absolute;
    display: block;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #007bff;
    border: 1px solid #007bff;
    border-radius: 30px;
    transition: .3s;
    box-sizing: border-box;
}

.results-view-switch .hc-slider:before {
    position: absolute;
    content: "";
    display: block;
    height: 1.25em;
    width: 1.25em;
    left: 0.25em;
    bottom: 0.22em;
    border-radius: 20px;
    background-color: #fff;
    transition: .3s;
}

.results-view-switch.hc-switch input:checked + .hc-slider:before {
    transform: translateX(calc(3.8em - 1.25em - 0.50em));
}

.rinks-map-panel {
    margin-top: 12px;
    margin-bottom: 12px;
    border: 1px solid #d9e4f1;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 20px rgba(20, 56, 94, 0.08);
}

.rinks-map-canvas {
    width: 100%;
    height: 420px;
    background: #eef3f9;
}

.rinks-map-note {
    padding: 8px 12px;
    font-size: 12px;
    color: #5f7388;
    border-top: 1px solid #e4edf7;
    background: #f8fbff;
}

.rinks-map-panel .leaflet-popup-content-wrapper {
    border-radius: 12px;
}

.rinks-map-panel .leaflet-popup-content {
    margin: 14px 16px;
    min-width: 240px;
    max-width: 320px;
}

.map-pin-popup {
    font-size: 14px;
    line-height: 1.5;
}

.map-pin-popup strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    color: #17324f;
}

.map-pin-popup span {
    display: block;
    color: #5f7388;
    margin-bottom: 8px;
}

.map-pin-popup a {
    font-weight: 600;
}

@media (max-width: 767px) {
    .rink-search {
        padding: 14px 12px 4px;
        border-radius: 14px;
    }

    .mode-slider-wrap {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .rink-search-main-row {
        display: block;
    }

    .action-block-row {
        margin-left: -15px;
        margin-right: -15px;
    }

    .action-block-row > [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }

    #action-block #search-btn {
        margin-top: 0;
    }

    .location-helper-row .col-md-12 {
        align-items: stretch;
    }

    .location-helper-row #smart-suggestions,
    .location-helper-row #location-error {
        width: 100%;
    }

    .rink-search-top {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .rink-search-top .rink-search-showing {
        text-align: center;
    }

    .rinks-map-canvas {
        height: 320px;
    }

    .rinks-map-panel .leaflet-popup-content {
        min-width: 200px;
    }
}
