/* **********************************************************************
 *  MAP LAYOUT
 * ******************************************************************** */

#mappcanada-map {
    width: 100%;
    height: 60vh;
    min-height: 400px;
}

.mappcanada-map-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/*
 * Full-width map breakout on the front page.
 * `overflow-x: hidden` on the body prevents the scrollbar that `100vw`
 * would otherwise create when a vertical scrollbar is visible.
 */
body.page-id-9,
body.front-page-map {
    overflow-x: hidden;
}

body.page-id-9 .mappcanada-map-wrapper[data-mappcanada="map"],
body.front-page-map .mappcanada-map-wrapper[data-mappcanada="map"] {
    max-width: 100vw !important;
    width: 100vw !important;
    margin-left: 50% !important;
    transform: translateX(-50%);
}

body.page-id-9 #mappcanada-map,
body.front-page-map #mappcanada-map {
    width: 100%;
}

/* Simple marker style for Mapbox front-page map */
.mappcanada-map-marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #b22222;
    border: 2px solid #ffffff;
    box-shadow: 0 0 2px rgba(0,0,0,0.4);
}

/* Province flag-style markers on front map */
.mappcanada-province-marker {
    display: block;
    border-radius: 4px;
    background-color: #ffffff;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
    cursor: pointer;
    opacity: 0.9;
}

.mappcanada-province-marker:hover {
    opacity: 1;
    transform: scale(1.05);
}






/* (Info window styles kept for now if you reuse them elsewhere) */
.mappcanada-info-window {
    font-family: inherit;
    font-size: 13px;
}

.mappcanada-info-window strong {
    font-size: 14px;
}

.mappcanada-info-window a {
    color: #b22222;
    text-decoration: none;
}

.mappcanada-info-window a:hover {
    text-decoration: underline;
}

.mappcanada-map-cta {
    text-align: center;
    margin-top: 20px;
}

.mappcanada-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    background: #b22222;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.03em;
    border: none;
    cursor: pointer;
}

.mappcanada-btn--secondary {
    background: #ffffff;
    color: #b22222;
    border: 1px solid #b22222;
}

.mappcanada-btn--secondary:hover {
    background: #f7f0f0;
}

.mappcanada-btn:hover {
    background: #921b1b;
}

/* **********************************************************************
 *  PROVINCE ARCHIVE – CARD GRID
 * ******************************************************************** */

.tax-province .wp-block-query .wp-block-post-template {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    column-gap: 16px;
    row-gap: 16px;
    list-style: none;
}

.tax-province .wp-block-query .wp-block-post-template > li {
    margin: 0;
    padding: 14px 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    cursor: pointer;
}

.tax-province .wp-block-query .wp-block-post-template > li:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
    border-color: #d0d0d0;
}

.tax-province .wp-block-post-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.tax-province .wp-block-post-title a {
    text-decoration: none;
    color: #222222;
}

.tax-province .wp-block-post-title a:hover {
    text-decoration: underline;
}

.tax-province .wp-block-post-excerpt,
.tax-province .wp-block-post-date {
    margin: 0;
    font-size: 13px;
    color: #777777;
}

.tax-province .wp-block-query {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

/* **********************************************************************
 *  CARD META
 * ******************************************************************** */

.tax-province .mappcanada-card-meta {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #777777;
}

.tax-province .mappcanada-card-location {
    font-weight: 500;
}

.tax-province .mappcanada-card-categories {
    font-style: italic;
}

.tax-province .mappcanada-card-separator {
    margin: 0 4px;
    color: #b0b0b0;
}

/* **********************************************************************
 *  SINGLE BUSINESS DETAILS & OPENING HOURS
 * ******************************************************************** */

.mappcanada-business-details {
    max-width: 1100px;
    margin: 24px auto;
    padding: 16px 20px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
}

.mappcanada-business-details__section {
    margin-bottom: 16px;
}

.mappcanada-business-details__heading {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.mappcanada-business-details__text {
    margin: 0;
    font-size: 14px;
}

.mappcanada-business-details__list {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
}

.mappcanada-business-hours {
    margin: 0;
    padding: 0;
}

.mappcanada-business-hours__row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
}

.mappcanada-business-hours__day {
    margin: 0;
    font-weight: 500;
}

.mappcanada-business-hours__time {
    margin: 0;
}

/* **********************************************************************
 *  SINGLE BUSINESS MAP
 * ******************************************************************** */

.mappcanada-business-map-wrapper {
    max-width: 1100px;
    margin: 16px auto 24px auto;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 10px;
    box-sizing: border-box;
}

#mappcanada-business-map {
    width: 100%;
    height: 360px;
    border-radius: 8px;
}

/* **********************************************************************
 *  SINGLE BUSINESS – HEADER BLOCK
 * ******************************************************************** */

.mappcanada-business-header {
    max-width: 1100px;
    margin: 8px auto 16px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.mappcanada-business-header__meta {
    font-size: 14px;
    color: #777777;
    margin-bottom: 4px;
}

.mappcanada-business-header__excerpt {
    font-size: 14px;
    color: #333333;
    margin-bottom: 8px;
}

.mappcanada-business-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* compact tag-style buttons in header */
.mappcanada-business-header__actions .mappcanada-btn {
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 999px;
}

.mappcanada-business-header__actions .mappcanada-btn--secondary {
    border-width: 1px;
}

/* safety: hide any stray <br> that might get injected */
.mappcanada-business-header__actions br {
    display: none !important;
}

/* semantic modifier – no extra styles, kept for markup clarity */
.mappcanada-btn--small {
    /* no-op; sizing comes from scoped header rule */
}

/* **********************************************************************
 *  SINGLE BUSINESS – DETAILS + MAP LAYOUT
 * ******************************************************************** */

/* Outer layout container: 2 columns on desktop, stacked on mobile */
.mappcanada-business-layout {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 20px;
    box-sizing: border-box;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); /* details 1/4, map 3/4 */
    gap: 16px;
    align-items: stretch;
}

/* Details card inside layout – equal height with map column */
.mappcanada-business-layout__details .mappcanada-business-details {
    margin: 0;
    max-width: 420px; /* optional */
    height: 100%;
    box-sizing: border-box;
}

/* Map card to match details card look */
.mappcanada-business-map-card {
    height: 100%;
    padding: 10px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
}

/* Map inside the card */
.mappcanada-business-map-card #mappcanada-business-map {
    width: 100%;
    flex: 1 1 auto;
    min-height: 260px;
    border-radius: 8px;
}

/* Stack on small screens */
@media (max-width: 768px) {
    .mappcanada-business-layout {
        grid-template-columns: 1fr;
        margin: 16px auto;
    }

    .mappcanada-business-map-card #mappcanada-business-map {
        min-height: 220px;
    }
}