/* ==========================================================================
   Location Finder Section
   ========================================================================== */

.rw-location-finder-section {
    padding-top: var(--pad-top, 30px);
    padding-bottom: var(--pad-bottom, 30px);
    padding-left: 20px;
    padding-right: 20px;
}

.widget-church-online .rw-location-finder__label {
    margin-bottom: -10px;
}

.rw-location-finder__label {
    margin-bottom: 20px;
}

/* Two-column: left (location) + right (widget, fixed width) */
.rw-location-finder {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 20px;
    align-items: end;
}

.rw-location-finder-section-single .rw-location-finder__left {
    display: flex;
}

.rw-location-finder-section-single .rw-location-finder {
    align-items: stretch;
}

/* ==========================================================================
   Location Tabs
   ========================================================================== */

.rw-location-tabs__nav {
    display: flex;
    gap: 3px;
}

.rw-location-tab__btn {
    flex: 0 0 calc(33.333% - 2px);
    padding: 21px 28px;
    background: #555555;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    border-radius: var(--rw-corners) var(--rw-corners) 0 0;
    transition: background 0.2s ease;
    font-size: 25px;
    border: 1px solid #555555;
    text-align: left;
    min-height: 72px;
}

.rw-location-tab__btn.is-active {
    background: #111111;
    border: 1px solid #111111;
}

.rw-location-tab__btn:hover {
    background: var(--rw-secondary);
    border: 1px solid var(--rw-secondary);
}

.rw-location-tab__btn:focus,
.rw-location-tab__btn:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 2px;
}

.rw-location-tab__panel {
    display: none;
}

.rw-location-tab__panel.is-active {
    display: block;
}

/* ==========================================================================
   Location Card - info card + map side by side inside a tab panel
   ========================================================================== */

.rw-location-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 32px 32px 32px 50px;
    background: var(--rw-accent);
    border-radius: var(--rw-corners);
    margin-top: 20px;
}

.rw-location-finder-section-single .rw-location-card {
    margin-top: 0;
}

/* When inside tab panels - connect flush to tabs */
.rw-location-tabs__panels .rw-location-card {
    margin-top: 0;
    border-radius: 0 var(--rw-corners) var(--rw-corners) var(--rw-corners);
    min-height: 411px;
    padding: 32px 32px 32px 50px;
}

.rw-location-card__info {
    align-self: center;
}

h4.rw-location-card__title, .rw-location-card__link {
    font-weight: 700;
    margin-left: 32px;
}

.rw-location-card__heading,
.rw-location-card__title {
    margin-bottom: 12px;
}

.rw-location-card__content {
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Icon details - mirrors icon-detail.css */
.rw-location-card__details {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rw-location-card__detail {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.rw-location-card__detail span br {
    display: none;
}

.rw-location-card__detail i {
    flex-shrink: 0;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5px;
    color: black;
}

.rw-location-card__detail a {
    color: inherit;
    text-decoration: none;
}

.rw-location-card__detail a:hover {
    color: var(--rw-primary);
}

.rw-location-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--rw-primary);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.rw-location-card__link:hover {
    color: var(--rw-secondary);
    text-decoration: none;
}

/* Map */
.rw-location-card__map {
    border-radius: 15px;
    overflow: hidden;
    min-height: 260px;
    height: 100%;
}

.rw-location-card__map iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}


/* ==========================================================================
   Admin notice - single mode without location selected
   ========================================================================== */

.rw-location-notice {
    padding: 16px 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media ( max-width: 1420px ) {

    .widget-church-online .rw-location-finder__label {
        margin-bottom: 20px;
    }

}

@media ( max-width: 1200px ) {
    .rw-location-card {
        grid-template-columns: 1fr;
        padding: 32px;
        gap: 15px;
    }

    .rw-location-tab__btn {
        flex: 0 0 calc(50% - 2px);
        font-size: 20px;
    }

    .rw-location-finder {
        align-items: start;
    }

    .rw-location-tabs__panels .rw-location-card {
        padding: 40px 25px 25px 25px;
        border-radius: 0 0 var(--rw-corners) var(--rw-corners);
    }

    .rw-location-card__map {
        min-height: 350px;
    }

    .rw-location-finder-section-single .rw-location-finder {
        align-items: start;
    }

    .rw-location-finder__right {
        position: sticky;
        top: 20px;
    }
}

@media (max-width: 992px) {
    .rw-location-finder {
        grid-template-columns: 1fr;
    }

    .rw-location-tab__btn {
        flex: 1;
    }

    button.rw-location-tab__btn {
        font-size: 20px !important;
    }

    .rw-location-finder-section {
        padding-top: calc(var(--pad-top, 20px) / 2);
        padding-bottom: calc(var(--pad-bottom, 20px) / 2);
    }

}

@media ( max-width: 640px ) {

    .rw-location-finder__right {
        position: relative;
        top: auto;
    }

    .rw-location-tab__btn {
        padding: 14px 16px;
        font-size: 18px;
    }

}