/**
 * Musikschule Suche – Styles
 * Designed to coexist with Elementor containers.
 * All classes are prefixed with "msuche-" to avoid theme conflicts.
 */

.msuche-wrapper {
    --msuche-primary: #0095eb;
    --msuche-primary-dark: #007cc3;
    --msuche-text: #000000;
    --msuche-light-gray: #f8f8f8;
    --msuche-border: #e0e0e0;
    --msuche-button-bg: #000000;
    --msuche-button-hover: #2994d7;
    --msuche-sponsor-bg: #fff8dc;
    --msuche-sponsor-border: #f0c040;
    font-size: 16px;
    line-height: 1.6;
    color: var(--msuche-text);
    width: 100%;
    --font-family: "Bricolage Grotesque", Sans-serif;
}

.msuche-wrapper *,
.msuche-wrapper *::before,
.msuche-wrapper *::after {
    box-sizing: border-box;
}

.msuche-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.msuche-container2 {
    /* max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px; */
    width: 100%;
}

/* In Elementor-Hero meist nicht nötig - der Container kümmert sich um die Breite */
.msuche-wrapper--form .msuche-container {
    padding-left: 0;
    padding-right: 0;
}

/* Typography */
.msuche-title {
    font-size: 48px;
    line-height: 1.2;
    font-weight: 400;
    margin: 0 0 20px;
    text-align: center;
    color: inherit;
}

.msuche-subtitle {
    font-size: 20px;
    text-align: center;
    color: inherit;
    opacity: 0.85;
    margin: 0 0 40px;
}

/* Search Box */
.msuche-search-box {
    /* background: #ffffff;
    border: 1px solid var(--msuche-border);
    border-radius: 12px;
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); */
}

.msuche-search-row {
    display: flex;
    gap: 15px;
    /* flex-wrap: wrap; */
    justify-content: start;
    align-items: center;
}


.msuche-wrapper select,
.msuche-wrapper input[type="text"],
.msuche-wrapper input[type="number"] {
    font-family: var(--font-family);
    font-size: 16px;
    padding: 14px 18px;
    border: 1px solid var(--msuche-border);
    border-radius: 8px;
    min-width: 180px;
    background: #fff;
    color: var(--msuche-text);
    line-height: 1.2;
    height: 50px;
}

.msuche-wrapper select:focus,
.msuche-wrapper input:focus {
    outline: none;
    border-color: var(--msuche-primary);
    box-shadow: 0 0 0 3px rgba(0, 149, 235, 0.15);
}

/* Combo (Umkreis-Dropdown) */
.msuche-combo {
    position: relative;
    /* min-width: 6em; */
}

.msuche-combo-unit {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    font-size: 16px;
}

.msuche-combo-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    background: white;
    display: none;
    max-height: 250px;
    overflow: auto;
    z-index: 1000;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.msuche-combo-item {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 16px;
}

.msuche-combo-item:hover,
.msuche-combo-item.msuche-active {
    background: #e6e6e6;
}

/* Button */
.msuche-wrapper button {
    font-family: var(--font-family);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background-color: #000000;
    border: #000000;
    color: #FFFFFF;
    border-radius: 100px 100px 100px 100px;
    padding: 15px 30px 15px 30px;
    text-align: center;
    transition: all .3s;
    display: inline-block;
    line-height: 1;

}

.msuche-wrapper button:hover {
    background-color: var( --e-global-color-primary );
}
.msuche-wrapper button:focus:not(:focus-visible), .msuche-wrapper button:focus:not(:focus-visible), .msuche-wrapper button:focus:not(:focus-visible)
.msuche-wrapper button:disabled {
    background-color: var( --e-global-color-primary );
    cursor: not-allowed;
    transform: none;
}

/* #msuche-plz {
    width: 6em;
    min-width: 6em;
} */
/* 
#msuche-radius {
    width: 6em;
    min-width: 6em;
    padding-right: 36px;
} */

/* Results */
.msuche-result-card {
    background: white;
    border: 1px solid var(--msuche-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}

.msuche-result-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.msuche-result-card.msuche-sponsor {
    background: var(--msuche-sponsor-bg);
    border: 2px solid var(--msuche-sponsor-border);
    /* background: rgba(27, 96, 139, 0.1);
    border: 2px solid #1B608B; */
}

.msuche-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.msuche-result-text {
    flex: 1;
    min-width: 0;
}

.msuche-result-text a {
    color: var(--msuche-primary);
    text-decoration: none;
    word-break: break-word;
}

.msuche-result-text a:hover {
    text-decoration: underline;
}

.msuche-result-logo {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.msuche-result-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px !important;
}

.msuche-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #777;
    font-size: 18px;
    background: white;
    border: 1px dashed var(--msuche-border);
    border-radius: 12px;
}

/* Alert */
#msuche-customAlert {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    background-color: #fff;
    border: 1px solid #999;
    border-radius: 12px;
    z-index: 100000;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 90vw;
}

#msuche-customAlert p {
    margin: 0 0 20px 0;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    color: var(--msuche-text);
}

#msuche-customAlert button {
    padding: 10px 30px;
}

/* Disclaimer */
.msuche-disclaimer {
    text-align: center;
    color: #777;
    font-size: 14px;
    margin: 40px 0 20px;
    padding: 20px;
    border-top: 1px solid var(--msuche-border);
}

.msuche-disclaimer a {
    color: var(--msuche-primary);
    text-decoration: none;
}

.msuche-disclaimer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .msuche-title {
        font-size: 32px;
    }

    .msuche-subtitle {
        font-size: 16px;
        margin-bottom: 25px;
    }

    /* .msuche-search-box {
        padding: 20px 15px;
    } */
    .msuche-search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .msuche-wrapper select,
    .msuche-wrapper input,
    .msuche-wrapper button,
    .msuche-combo {
        min-width: 100%;
        width: 100%;
    }

    #msuche-plz,
    #msuche-radius {
        width: 100%;
    }

    .msuche-result-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .msuche-result-logo {
        width: 100%;
        height: auto;
        max-width: 200px;
        margin: 15px auto 0;
    }
}

.msuche-wrapper--results #msuche-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.msuche-wrapper--results .msuche-disclaimer {
    grid-column: 1 / -1;
}

.msuche-wrapper--results .msuche-no-results {
    grid-column: 1 / -1;
}

.msuche-wrapper--results .msuche-result-card {
    margin-bottom: 0;
}

.msuche-wrapper--results .msuche-result-card.msuche-sponsor {
    grid-column: 1 / -1;
}
.msuche-search-row {
    flex-wrap: wrap;
}

.msuche-search-row > #msuche-instrument,
.msuche-search-row > #msuche-plz,
.msuche-search-row > .msuche-combo {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

.msuche-search-row > .msuche-combo > #msuche-radius {
    width: 100%;
    min-width: 0;
}

.msuche-search-row > #msuche-searchBtn {
    flex: 0 0 auto;
    width: auto;
}

@media (max-width: 768px) {
    .msuche-wrapper--results #msuche-results {
        grid-template-columns: 1fr;
    }

    .msuche-wrapper--results .msuche-result-card.msuche-sponsor .msuche-result-logo {
        width: 250px;
        height: 250px;
    }
}