/**
 * Public Partner Locator styles
 *
 * Scoped under #bufl-locator so we don't collide with other shortcodes or
 * theme styles. Mirrors the dealership locator look (list + map) with a
 * card-based result format and partner-type badges.
 */

#bufl-locator h2 {
    font-size: 1.25rem;
    color: #a119cf;
}

#bufl-locator-form {
    background: #eee;
    padding: 30px;
    border-radius: 0.25rem;
    margin-top: 30px;
}

#bufl-locator-results {
    padding-top: 30px;
}

#bufl-locator-form .form-group {
    margin-bottom: 18px;
}

#bufl-locator-error {
    margin-bottom: 18px;
}

/* Map */
#bufl-locator-map {
    position: relative;
    padding-bottom: 50%;
    margin-bottom: 25px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}
#bufl-locator-map > .map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Result list */
.bufl-locator-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bufl-locator-card {
    padding: 18px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 14px;
    background: #fff;
    transition: box-shadow 150ms ease;
}
.bufl-locator-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bufl-locator-card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}
.bufl-locator-card-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.bufl-locator-card-meta {
    color: #666;
    font-size: 0.95rem;
    margin: 0 0 12px;
}

.bufl-locator-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.bufl-locator-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    color: #1a6cb3;
}
.bufl-locator-action:hover {
    text-decoration: underline;
}
.bufl-locator-action .fa {
    font-size: 0.9rem;
}

/* Partner-type badge — color is set inline from BUFL_PARTNER_TYPE_CONFIG. */
.bufl-locator-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: #6c757d; /* fallback if no config match */
    line-height: 1.4;
    white-space: nowrap;
}

/* Services Offered chips — neutral outline pills, distinct from the solid
   partner-type badge. Wraps onto multiple rows as needed. Vertical margin is
   symmetric (and collapses with the meta line above) so the row sits evenly
   between the city/state line and the action links below. */
.bufl-locator-services {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
/* Shared label for Services Offered / Languages Served / Additional Notes. */
.bufl-locator-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-right: 2px;
}
.bufl-locator-services-label {
    display: block;
    margin-bottom: 6px;
}
.bufl-locator-info .bufl-locator-services-label {
    margin-top: 6px;
    margin-bottom: 0;
}

.bufl-locator-service-chip {
    display: inline-block;
    padding: 2px 10px;
    border: 1px solid #b9c2cc;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    color: #3a4654;
    background-color: transparent;
    line-height: 1.5;
}

/* Languages Served / Additional Notes — labeled free-text rows. Line breaks
   in the value are preserved (textarea content). */
.bufl-locator-note {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.4;
}
.bufl-locator-note-value {
    white-space: pre-line;
}

/* Keep an even gap above the action links whether or not the supplementary
   rows (chips / notes) are present. Margins collapse with the row above, so
   the services-only spacing is unchanged. */
.bufl-locator-card-actions {
    margin-top: 12px;
}

.bufl-locator-card-actions a.btn,
.bufl-locator-info-actions a.btn {
    text-decoration: none;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: normal;
    transition: all 150ms ease;
}

.bufl-locator-card-actions a.btn:hover,
.bufl-locator-info-actions a.btn:hover {
    background: #2E6FAE;
}

/* Map info window */
.bufl-locator-info {
    min-width: 280px;
    max-width: 360px;
    padding: 0 10px 40px 10px;
    line-height: 1.45;
}
.bufl-locator-info h4 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 600;
}
.bufl-locator-info-type {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.bufl-locator-info-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}
.bufl-locator-info-actions .bufl-locator-action {
    word-break: break-word;
}
.bufl-locator-info .bufl-locator-service-chip {
    display: block;
    border: none;
    padding: 0 0 2px 0;
    color: #444445;
    font-weight: normal;
}
.bufl-locator-info .bufl-locator-service-chip:before {
    content: ' · ';
    padding-right: 5px;
    display: inline-block;
}
.bufl-locator-info .bufl-locator-services {
    display: block;
}

@media (max-width: 600px) {
    .bufl-locator-card {
        padding: 14px 16px;
    }
    .bufl-locator-card-name {
        font-size: 1.1rem;
    }
    .bufl-locator-card-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
