/* =================================================
   VB-Suche – Card Grid
   ================================================= */

.vb-search-container {
    width: 100%;
    font-family: 'DVAG TYPE', sans-serif;
}

/* --- Search Bar --- */
.vb-search-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 40px;
}

.vb-search-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vb-search-input,
.vb-search-radius {
    width: 100%;
}


.vb-search-label {
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    margin-bottom: 8px;
}

.vb-search-required {
    color: #cc0000;
    margin-left: 2px;
}

.vb-search-input {
    min-width: 0;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #D6D6D6;
    border-radius: 0;
    font-size: 14px;
    outline: none;
    box-shadow: none;
    color: #2B2B2B;
}

.vb-search-input::placeholder {
    color: #CBCBCB;
}

.vb-search-input:focus {
    border-color: #337A96;
}

.vb-search-radius {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #D6D6D6;
    border-radius: 0;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    color: #2B2B2B;
}

.vb-search-btn {
    height: 40px;
    padding: 0 24px;
    background-color: #337A96;
    color: #ffffff;
    border: none;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.vb-search-btn:hover {
    background-color: #256680;
}

/* --- Status Message (loading, error, no results) --- */
.vb-search-status {
    padding: 12px 16px;
    font-size: 14px;
    color: #555;
    background: #f5f5f5;
    border-left: 3px solid #337A96;
    margin-bottom: 16px;
}

.vb-search-status.error {
    border-left-color: #cc0000;
    color: #cc0000;
    background: #fff5f5;
}

/* --- Fehler oberhalb der GF-Buttons (Zurück + Weiter) --- */
.vb-gf-next-error {
    padding: 12px 16px;
    font-size: 14px;
    color: #cc0000;
    background: #fff5f5;
    border-left: 3px solid #cc0000;
    margin-bottom: 16px;
}

/* --- Card Grid --- */
.vb-search-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* --- Single Card --- */
.vb-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #D6D6D6;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    user-select: none;
}

.vb-card:hover {
    border-color: #C8AA22;
}

/* --- Selected --- */
.vb-card.is-selected {
    border-color: #C8AA22;
}

.vb-card.is-selected::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background-color: #337A96;
    border-radius: 50%;
    background-image: url('../../../themes/hello-theme-child-master/assets/images/white-tick-arrow.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
}

/* --- Photo --- */
.vb-card-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #EFEFEF;
    flex-shrink: 0;
}

.vb-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vb-card-photo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #AAAAAA;
}

/* --- Info Area --- */
.vb-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* --- Name --- */
.vb-card-name {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #2B2B2B;
    margin: 0 0 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 40px;
    margin-bottom: 5px;
}

/* --- ZIP + City --- */
.vb-card-location {
    font-size: 14px;
    font-weight: 700;
    color: #2B2B2B;
    margin: 0 0 6px;
    line-height: 20px;
}

/* --- Distance --- */
.vb-card-distance {
    font-size: 12px;
    font-weight: 400;
    color: #808080;
    display: block;
    margin-top: auto;
    line-height: 16px;
}

/* --- Tooltip (body-level, position: fixed) --- */
.vb-card-tooltip {
    position: fixed;
    width: 320px;
    background: #ffffff;
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.16);
    padding: 16px;
    z-index: 9999;
    pointer-events: none;
}

/* Arrow element – points to card center (left set via JS) */
.vb-card-tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    transform: translateX(-50%);
}

/* Default: tooltip below card → arrow at top, pointing up */
.vb-card-tooltip:not(.vb-card-tooltip--above) .vb-card-tooltip-arrow {
    top: -8px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
}

/* Above card: arrow at bottom, pointing down */
.vb-card-tooltip--above .vb-card-tooltip-arrow {
    bottom: -8px;
    top: auto;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffffff;
}

.vb-card-tooltip-name {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #2B2B2B;
    margin: 0 0 2px;
}

.vb-card-tooltip-location {
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: #2B2B2B;
    margin: 0 0 16px;
}

.vb-card-tooltip-description {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #2B2B2B;
    margin: 0;
}

/* --- Mobile description + toggle (hidden on desktop) --- */
.vb-card-mobile-desc {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #2B2B2B;
    margin-top: 24px;
    margin-bottom: 12px;
}

.vb-card-toggle {
    display: none;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    color: #C8AA22;
    cursor: pointer;
    margin-top: 10px;
    text-align: center;
    width: 100%;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .vb-search-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .vb-search-bar {
        grid-template-columns: 1fr;
    }

    .vb-search-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .vb-search-grid {
        grid-template-columns: 1fr;
    }

    .vb-card-toggle {
        display: block;
    }
}
