/* =================================================================
   STYLES FÜR DAS MX-CDVO SUCHFORMULAR (Version 1.6 - FINAL)
   ================================================================= */

/* 1. Der Haupt-Container des Formulars */
.mx-cdvo-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 900px;
    margin: 0 auto;
}

/* 2. Die Wrapper für jedes einzelne Feld */
.mx-cdvo-search-form .form-group {
    flex-grow: 1;
    flex-basis: 200px;
    position: relative;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 5px;    
}
.mx-cdvo-search-form .form-group:focus-within {
    border-color: #00847d;
    box-shadow: 0 0 0 2px rgba(0, 132, 125, 0.2);
    background-color: #fff;
}

/* 3. Allgemeine Styles für das Dropdown-Feld */
.mx-cdvo-search-form select {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0 15px 0 15px;
    line-height: 48px;
    font-size: 16px;
    color: #333;
    border: none;
    background-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
	border:1px solid #000000;
}

/* 4. Die Icons vor den Eingabefeldern */
.mx-cdvo-search-form .form-group::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.6;
    z-index: 3;
}
.mx-cdvo-search-form .form-group-abfallart::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
}
.mx-cdvo-search-form .form-group-ort::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E");
}
.mx-cdvo-search-form .form-group-abfallart {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23555'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 24px;
}

/* 5. Der "Finden"-Button */
.mx-cdvo-search-form .form-group-submit {
    flex-grow: 0;
    flex-basis: auto;
    border: none;
    background: none;
}
.mx-cdvo-search-form .search-submit {
    background-color: #00847d;
    color: white;
    font-weight: bold;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
	height:auto;
    transition: background-color 0.2s ease;
}
.mx-cdvo-search-form .search-submit:hover {
    background-color: #006a64;
}

/* 6. Unsichtbare Labels */
.mx-cdvo-search-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* 7. Styles für den "Ghost"-Input-Wrapper */
.mx-cdvo-search-form .ort-input-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}
.mx-cdvo-search-form .search-field-ghost,
.mx-cdvo-search-form .search-field {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0 15px 0 45px;
    line-height: 48px;
    font-size: 16px;
    border: none;
    background-color: transparent;
    outline: none;
	border:1px solid #000000;
}
.mx-cdvo-search-form .search-field-ghost {
    color: #b0b0b0;
    z-index: 1;
    pointer-events: none;
}
.mx-cdvo-search-form .search-field {
    z-index: 2;
    color: #000000;
}
.search-field::placeholder {
  color: #666666;
}


/* 8. Responsive Anpassung */
@media (max-width: 768px) {
    .mx-cdvo-search-form {
        gap: 10px;
        padding: 0 10px;
        max-width: 100%;
    }

    .mx-cdvo-search-form .form-group {
        flex-basis: calc(100% - 5px);
        min-width: 150px;
    }

    .mx-cdvo-search-form .form-group-submit {
        flex-basis: 100%;
    }

    .mx-cdvo-search-form .search-submit {
        width: 100%;
    }
}


/* Der Grid-Container, der die Karten enthält */
.mx-cdvo-grid-container {
    display: grid;
    gap: 20px; /* Der Abstand zwischen den Karten */
    margin: 2em 0; /* Etwas Abstand nach oben und unten */

    /* DESKTOP: 4 gleich breite Spalten */
    grid-template-columns: repeat(4, 1fr);
}

/* Die einzelne Karte im Grid */
.mx-cdvo-grid-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    overflow: hidden; /* Stellt sicher, dass das Bild innerhalb des Radius bleibt */
    display: flex;
    flex-direction: column; /* Stapelt Bild, Inhalt und Button vertikal */
}

/* Das Bild oben in der Karte */
.mx-cdvo-grid-item .item-image {
    width: 100%;
    height: 180px; /* Eine feste Höhe für einheitliches Design */
    background-color: #f8f8f8; /* Platzhalter-Farbe, falls ein Bild fehlt */
}

.mx-cdvo-grid-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Füllt den Bereich perfekt aus, ohne das Bild zu verzerren */
    display: block;
}

/* Der Inhaltsbereich (Titel, Preis) */
.mx-cdvo-grid-item .item-content {
    padding: 20px;
    text-align: center;
    flex-grow: 1; /* Wichtig: Dieser Bereich dehnt sich aus und schiebt den Button nach unten */
}

.mx-cdvo-grid-item .item-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.mx-cdvo-grid-item .item-price {
    font-size: 1rem;
    color: #333;
    margin: 0;
}

.mx-cdvo-grid-item .item-price span {
    font-size: 1.6rem;
    font-weight: 700;
    color: #005A9C; /* Ihre Akzentfarbe */
    display: block;
}

/* Der Button am unteren Rand der Karte */
.mx-cdvo-grid-item .item-button {
    display: block;
    padding: 15px;
    margin: 0 20px 20px 20px;
    background-color: #0073e6; /* Ihre Button-Farbe */
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
}

.mx-cdvo-grid-item .item-button:hover {
    background-color: #005bbd;
}

/* --- Responsive Anpassungen --- */

/* Für Tablets (optional, aber empfohlen): 2 Spalten */
@media (max-width: 1024px) {
    .mx-cdvo-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* FÜR MOBILGERÄTE: 1 Spalte (wie gewünscht) */
@media (max-width: 767px) {
    .mx-cdvo-grid-container {
        grid-template-columns: 1fr;
        gap: 25px; /* Etwas mehr Abstand auf Mobilgeräten */
    }
}
