/* ATM locator plugin — mobile-first, desktop breakpoint at 768px */
.atm-plugin {
    --atm-primary: #1C4596;
    --atm-accent: #42B1E1;
    --atm-text: #17293E;
    --atm-text-muted: #6F6F6F;
    --atm-border: #E4E4E4;
    --atm-bg-muted: #F2F2F2;

    color: var(--atm-text);
    max-width: 480px;
    margin: 2rem auto;
}

.atm-step {
    display: none;
}

.atm-step.active {
    display: block;
}

.atm-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.atm-subheading {
    color: var(--atm-text-muted);
    margin: 0 0 1rem;
}

.atm-currency-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.atm-currency-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 1px solid var(--atm-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.atm-currency-card img {
    border-radius: 2px;
}

.atm-currency-card.selected {
    border-color: var(--atm-primary);
    background: rgba(28, 69, 150, 0.06);
}

.atm-currency-code {
    font-weight: 700;
}

.atm-currency-name {
    font-size: 0.85rem;
    color: var(--atm-text-muted);
}

.atm-show-button {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--atm-primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 1rem;
}

.atm-show-button:disabled {
    background: var(--atm-border);
    color: var(--atm-text-muted);
    cursor: not-allowed;
}

.atm-location-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 8px;
    padding: 0.75rem;
    background: var(--atm-bg-muted);
}

.atm-location-photo {
    width: 192px;
    height: 192px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 8px;
}

.atm-location-overlay {
    color: var(--atm-text);
}

.atm-location-title {
    margin: 0 0 0.25rem;
    font-weight: 700;
}

.atm-location-description {
    margin: 0;
    font-size: 0.85rem;
    color: var(--atm-text-muted);
}

.atm-location-description p {
    margin: 0;
}

.atm-back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: none;
    background: none;
    padding: 0;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--atm-primary);
    cursor: pointer;
}

.atm-results-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.atm-results-count {
    color: var(--atm-text-muted);
    margin: 0 0 1rem;
}

.atm-view-toggle {
    display: flex;
    border: 1px solid var(--atm-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.atm-view-tab {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: #fff;
    color: var(--atm-text-muted);
    cursor: pointer;
    font-weight: 700;
}

.atm-view-tab.active {
    background: var(--atm-primary);
    color: #fff;
}

.atm-map-panel,
.atm-list-panel {
    display: none;
}

.atm-map-panel.active,
.atm-list-panel.active {
    display: block;
}

#atm-map {
    width: 100%;
    height: 320px;
    border-radius: 8px;
    background: var(--atm-bg-muted);
}

.atm-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.atm-item {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--atm-border);
}

.atm-item.atm-item-hidden {
    display: none;
}

.atm-item-image {
    width: 160px;
    height: 320px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.atm-item-title {
    margin: 0 0 0.25rem;
    font-weight: 700;
}

.atm-item-description {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.85rem;
    color: var(--atm-text-muted);
}

.atm-item-description-marker {
    color: var(--atm-accent);
    margin-top: 0.15rem;
}

.atm-item-currencies-label {
    margin: 0.75rem 0 0.4rem;
    font-weight: 700;
}

.atm-item-currencies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.atm-item-currency {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.atm-item-flag {
    border-radius: 2px;
}

.atm-item-currency-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--atm-text-muted);
}

.atm-item-directions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    background: rgba(66, 177, 225, 0.15);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--atm-primary);
    text-decoration: none;
}

@media (min-width: 768px) {
    .atm-plugin {
        max-width: 960px;
        margin: 3rem auto;
    }

    .atm-currency-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .atm-view-toggle {
        display: none;
    }

    .atm-step-results.active .atm-map-panel,
    .atm-step-results.active .atm-list-panel {
        display: block;
    }

    .atm-step-results.active {
        display: grid;
        grid-template-columns: 1.1fr 0.9fr;
        gap: 1.5rem;
        align-items: start;
    }

    .atm-step-results.active .atm-back-button,
    .atm-step-results.active .atm-results-heading,
    .atm-step-results.active .atm-results-count {
        grid-column: 1 / -1;
    }

    #atm-map {
        height: 480px;
    }
}

/* "Prefer to use an ATM?" promo banner (location detail page) */
.atm-banner-wrapper {
    padding: 2rem 0;
}

.atm-banner {
    --atm-primary: #1C4596;
    --atm-accent: #42B1E1;
    --atm-text: #17293E;
    --atm-text-muted: #6F6F6F;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(66, 177, 225, 0.08);
    border: 1px solid rgba(66, 177, 225, 0.35);
}

.atm-banner-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--atm-primary);
    color: #fff;
    font-size: 1.25rem;
}

.atm-banner-body {
    flex: 1 1 240px;
    color: var(--atm-text);
}

.atm-banner-title {
    margin: 0 0 0.15rem;
    font-weight: 700;
}

.atm-banner-text {
    margin: 0;
    color: var(--atm-text-muted);
    font-size: 0.9rem;
}

.atm-banner-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: var(--atm-primary);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

@media (max-width: 480px) {
    .atm-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .atm-banner-body {
        flex-basis: auto;
    }

    .atm-banner-button {
        width: 100%;
        justify-content: center;
    }

    .atm-location-card {
        flex-direction: column;
        align-items: stretch;
    }

    .atm-location-photo {
        width: 100%;
        height: 160px;
    }
}
