/* Page shell for the Surfing/Astroid template. */
body.tanzschulen-alias #content,
body.tanzschulen-alias #content > .container-fluid,
body.tanzschulen-alias #content .astroid-component,
body.tanzschulen-alias #content .astroid-component-area,
body.tanzschulen-alias #content .com-content-article,
body.tanzschulen-alias #content .astroid-section,
body.tanzschulen-alias #content .astroid-row,
body.tanzschulen-alias #content .astroid-column,
body.tanzschulen-alias #content .astroid-article-text {
    background: transparent !important;
}

body.tanzschulen-alias #content > .container-fluid {
    padding-inline: 0 !important;
}

body.tanzschulen-alias #content .astroid-row {
    margin-inline: 0 !important;
}

body.tanzschulen-alias #content .astroid-column {
    padding-inline: 0 !important;
}

body.tanzschulen-alias #content .astroid-article-text > p {
    margin: 0 !important;
}

.tsf-app {
    margin: 3.5rem 0 3rem;
    padding: 2.75rem 2.5rem 3rem;
    background: #fff;
    box-sizing: border-box;
}

.tsf-app > h2 {
    position: relative;
    margin: 0 0 2rem !important;
    padding: 0 0 0.8rem 1rem;
    border-bottom: 2px solid #2ba1cf;
    color: #3f3f3f;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.25;
}

.tsf-app > h2::before {
    position: absolute;
    top: 0.15rem;
    bottom: 1rem;
    left: 0;
    width: 0.4rem;
    background: #2ba1cf;
    content: "";
}

.tsf-search-form {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-left: 4px solid #2ba1cf;
    background: #f7f7f7;
}

.tsf-search-form .form-label {
    margin-bottom: 0.45rem;
    color: #454545;
    font-weight: 500;
}

.tsf-search-form .form-control,
.tsf-search-form .form-select,
.tsf-search-form .btn {
    min-height: 46px;
    border-radius: 0;
}

.tsf-search-form .form-control,
.tsf-search-form .form-select {
    border: 1px solid #d8d8d8;
    background-color: #fff;
    box-shadow: none;
}

.tsf-search-form .form-control:focus,
.tsf-search-form .form-select:focus {
    border-color: #2ba1cf;
    box-shadow: 0 0 0 0.2rem rgba(43, 161, 207, 0.15);
}

.tsf-search-field {
    position: relative;
}

.tsf-search-suggestions {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 0.25rem);
    right: 0;
    left: 0;
    max-height: 19rem;
    overflow-y: auto;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #fff !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.tsf-search-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    color: #212529 !important;
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

.tsf-search-suggestion:hover,
.tsf-search-suggestion:focus,
.tsf-search-suggestion.active {
    color: #212529 !important;
    background: #fff !important;
}

.tsf-search-suggestion-type {
    flex: 0 0 auto;
    color: #6c757d !important;
    font-size: 0.8rem;
}

.tsf-map {
    width: 100%;
    height: var(--tsf-map-height, 480px);
    border: 1px solid #d8d8d8;
    border-radius: 0;
    background: #eef1f3;
    overflow: hidden;
}

.tsf-map .leaflet-control-layers {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
}

.tsf-map .leaflet-control-layers-expanded {
    padding: 0;
    font: inherit;
}

.tsf-map .leaflet-control-layers-list,
.tsf-map .leaflet-control-layers-base {
    margin: 0;
}

.tsf-map .leaflet-control-layers-base {
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: #fff;
}

.tsf-map .leaflet-control-layers-base label {
    margin: 0;
    cursor: pointer;
}

.tsf-map .leaflet-control-layers-base label + label {
    border-left: 1px solid #d8d8d8;
}

.tsf-map .leaflet-control-layers-base label > span {
    display: block;
}

.tsf-map .leaflet-control-layers-base input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tsf-map .leaflet-control-layers-base input + span {
    display: block;
    min-width: 88px;
    padding: 0.65rem 0.9rem;
    background: #fff;
    color: #454545;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.tsf-map .leaflet-control-layers-base label:hover input + span,
.tsf-map .leaflet-control-layers-base input:focus-visible + span {
    background: #eef8fc;
    color: #167fa9;
}

.tsf-map .leaflet-control-layers-base input:checked + span {
    background: #2ba1cf;
    color: #fff;
}

.tsf-map .leaflet-control-layers-separator {
    display: none;
}

.tsf-results-header {
    margin-top: 2.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #d8d8d8;
}

.tsf-results-header h2 {
    color: #3f3f3f;
    font-weight: 400;
}

.tsf-result-card {
    width: 100%;
    height: 24rem;
    overflow: hidden;
    border: 1px solid #e0e0e0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.tsf-result-card .card-body {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 1.4rem !important;
}

.tsf-results > [class*="col-"] {
    display: flex;
}

.tsf-card-title-row {
    display: flex;
    min-height: 2.8rem;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tsf-card-title-row .card-title {
    display: -webkit-box;
    min-width: 0;
    margin-bottom: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.tsf-location-count {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0.25rem 0.45rem;
    background: #eef8fc;
    color: #167fa9;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.tsf-school-logo {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    border-radius: 0.2rem;
    object-fit: contain;
}

.tsf-school-website {
    margin: 0 0 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tsf-location-selector {
    margin-bottom: 0.85rem;
}

.tsf-location-selector .form-label {
    margin-bottom: 0.3rem;
    color: #454545;
    font-size: 0.85rem;
    font-weight: 600;
}

.tsf-location-selector .form-select {
    border-radius: 0;
}

.tsf-location-view {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.35rem;
    scrollbar-width: thin;
}

.tsf-result-card address {
    margin-bottom: 0.75rem;
    font-style: normal;
}

.tsf-location + .tsf-location {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.tsf-location-title {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
}

.tsf-result-card a {
    overflow-wrap: anywhere;
}

.tsf-contact-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.25rem 0.45rem;
    margin-bottom: 0.3rem;
}

.tsf-contact-links,
.tsf-contact-item {
    display: block;
    min-width: 0;
}

.tsf-distance {
    font-weight: 600;
}

.tsf-empty {
    padding: 1.4rem;
    border: 1px solid #d8d8d8;
    border-left: 4px solid #2ba1cf;
    border-radius: 0;
    background: #f7f7f7;
    color: #555;
}

.tsf-leaflet-error {
    display: grid;
    place-items: center;
    padding: 2rem;
    text-align: center;
}

@media (max-width: 991.98px) {
    .tsf-app {
        margin-top: 2.25rem;
        padding: 2rem 1.5rem 2.25rem;
    }

    .tsf-map {
        height: clamp(400px, 55vh, var(--tsf-map-height, 480px));
    }
}

@media (max-width: 767.98px) {
    .tsf-app {
        margin: 1.5rem 0 2rem;
        padding: 1.5rem 1rem 1.75rem;
    }

    .tsf-app > h2 {
        margin-bottom: 1.4rem !important;
        font-size: 1.65rem;
    }

    .tsf-search-form {
        padding: 1rem;
    }

    .tsf-search-form .col-6 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    .tsf-search-form .d-grid.d-sm-flex {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem !important;
    }

    .tsf-search-form .btn,
    .tsf-search-form .form-control,
    .tsf-search-form .form-select {
        width: 100%;
    }

    .tsf-map {
        height: clamp(300px, 65vh, 390px);
    }

    .tsf-map .leaflet-control-layers-base input + span {
        min-width: 74px;
        padding: 0.55rem 0.65rem;
        font-size: 0.82rem;
    }

    .tsf-search-suggestion {
        align-items: flex-start;
    }

    .tsf-contact-row {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .tsf-result-card {
        height: 25rem;
    }
}

@media (max-width: 420px) {
    .tsf-app {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .tsf-search-form .d-grid.d-sm-flex {
        grid-template-columns: 1fr;
    }
}
