/**
 * booking-form-vue3-location.css — scoped styling for the Vue 3 Location step.
 *
 * Every rule is scoped under `.bpa-frontend-vue3-root` so it can only ever affect
 * the Vue 3 booking form's Location step markup — it never touches the legacy
 * (Vue 2) form or any shared component. Colours reuse the existing customize CSS
 * variables with safe fallbacks.
 *
 * @package BookingPressLocation\Vue3
 */

.bpa-frontend-vue3-root .bpa-front-module--location-items-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    margin-left: -12px;
    margin-right: -12px;
}

.bpa-frontend-vue3-root .bpa-front-tabs.--bpa-top .bpa-front-module--location-items-row {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.bpa-frontend-vue3-root .bpa-fm-li--col-item {
    padding-left: 12px;
    padding-right: 12px;
}

.bpa-frontend-vue3-root .bpa-fm-li--col-item .bpa-fm-li__card {
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid var(--bpa-gt-gray-400, #e2e8f0);
    border-radius: var(--bpa-radius-8px, 8px);
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    margin-bottom: 24px;
    animation-name: bpaLocFadeInUp;
    animation-timing-function: cubic-bezier(.51,.92,.24,1.15);    
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

@keyframes bpaLocFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10%);
        transform-origin: center;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(2) .bpa-fm-li__card { animation-delay: 0.1s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(3) .bpa-fm-li__card { animation-delay: 0.2s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(4) .bpa-fm-li__card { animation-delay: 0.3s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(5) .bpa-fm-li__card { animation-delay: 0.4s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(6) .bpa-fm-li__card { animation-delay: 0.5s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(7) .bpa-fm-li__card { animation-delay: 0.6s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(8) .bpa-fm-li__card { animation-delay: 0.7s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(9) .bpa-fm-li__card { animation-delay: 0.8s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(10) .bpa-fm-li__card { animation-delay: 0.9s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(11) .bpa-fm-li__card { animation-delay: 1s; }
.bpa-frontend-vue3-root .bpa-fm-li--col-item:nth-child(12) .bpa-fm-li__card { animation-delay: 1.1s; }

.bpa-frontend-vue3-root .bpa-fm-li--col-item .bpa-fm-li__card.__bpa-is-selected {
    border-color: var(--bpa-pt-main-green, #2563eb);
    box-shadow: 0 8px 16px rgba(114, 124, 149, 0.12), 0 4px 8px rgba(114, 124, 149, 0.12);
}

.bpa-frontend-vue3-root .bpa-fm-li--col-item .bpa-fm-li__card .bpa-li-col__image {
    margin-right: 16px;
    line-height: 0;
}

.bpa-frontend-vue3-root .bpa-fm-li--col-item .bpa-fm-li__card .bpa-li-col__image img {
    width: 92px;
    max-width: 92px;
    height: 92px;
    border-radius: var(--bpa-radius-16px, 16px);
    object-fit: cover;
}

.bpa-frontend-vue3-root .bpa-li-col__body .bpa-li-col__title {
    font-size: 15px;
    font-weight: 500;
    color: var(--bpa-dt-black-400, #1e293b);
    margin-bottom: 8px;
    font-family: var(--bpa-primary-font, inherit);
}

.bpa-frontend-vue3-root .bpa-li-col__body .bpa-li-col__address {
    font-size: 14px;
    line-height: 18px;
    color: var(--bpa-dt-black-300, #64748b);
    font-family: var(--bpa-primary-font, inherit);
}

.bpa-frontend-vue3-root .bpa-li-col__body .bpa-li-col__address.bpa-li-col__phone-no {
    margin-top: 8px;
}

.bpa-frontend-vue3-root .bpa-fm-li--col-item .bpa-fm-li__card .bpa-front-si-card--checkmark-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    line-height: 0;
}

.bpa-frontend-vue3-root .bpa-fm-li--col-item .bpa-fm-li__card .bpa-front-si-card--checkmark-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--bpa-pt-main-green, #2563eb);
}

.bpa-frontend-vue3-root .bpa-front-module--location-items-row .bpa-front-li-card__left {
    margin-right: 20px;
}

.bpa-frontend-vue3-root .bpa-front-module--location-items-row .bpa-front-li__default-img {
    width: 72px;
    height: 72px;
    border-radius: var(--bpa-radius-16px, 16px);
    border: 1px solid var(--bpa-gt-gray-400, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.bpa-frontend-vue3-root .bpa-front-module--location-items-row .bpa-front-li__default-img svg {
    fill: var(--bpa-dt-black-300, #64748b);
}

/* Disabled "Next" until a location is chosen. */
.bpa-frontend-vue3-root .bpa-front-module-location-module ~ .bpa-front-dc--footer .bpa-front-btn--primary[disabled],
.bpa-frontend-vue3-root .bpa-front-btn--primary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .bpa-frontend-vue3-root .bpa-front-module--location-items-row .bpa-front-li-card__left {
        margin-right: 0px;
    }
    .bpa-frontend-vue3-root .bpa-front-module--location-items-row {
        margin: 0;
        display: block;
    }
    .bpa-frontend-vue3-root .bpa-fm-li--col-item {
        padding: 0;
    }
    .bpa-frontend-vue3-root .bpa-fm-li--col-item .bpa-fm-li__card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .bpa-frontend-vue3-root .bpa-fm-li--col-item .bpa-fm-li__card .bpa-li-col__image {
        margin-right: 0;
        margin-bottom: 16px;
    }
    .bpa-frontend-vue3-root .bpa-fm-li--col-item .bpa-fm-li__card .bpa-li-col__body {
        text-align: center;
    }
}

/* --- Summary "Location" pill (legacy `.bpa-is-location-val__summary` extract,
       scoped to the Vue 3 form). Rendered under the summary heading, above the
       customer block — see LocationSummaryRow. `width: max-content` + auto
       margins replace the centering the legacy flex head provided. --- */
.bpa-frontend-vue3-root .bpa-is-location-val__summary {
    border: 1px solid var(--bpa-gt-gray-400, #e2e8f0);
    border-radius: var(--bpa-radius-4px, 4px);
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 16px auto 33px;
    margin-top: -17px;
    height: 28px;
}
.bpa-frontend-vue3-root .bpa-is-location-val__summary .bpa-lvs__label {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    background-color: var(--bpa-gt-gray-100, #f8fafc);
    font-size: 14px;
    font-weight: normal;
    font-family: var(--bpa-primary-font);
    line-height: 20px;
    color: var(--bpa-dt-black-300, #64748b);
    border-radius: var(--bpa-radius-4px, 4px) 0 0 var(--bpa-radius-4px, 4px);
}
.bpa-frontend-vue3-root .bpa-is-location-val__summary .bpa-lvs__val {
    display: flex;
    align-items: center;
    padding: 4px 16px;
}
.bpa-frontend-vue3-root .bpa-is-location-val__summary .bpa-lvs__val svg {
    width: 16px;
    min-width: 16px;
    height: 15px;
    margin-right: 4px;
    fill: var(--bpa-pt-main-green, #34d1a5);
    color: var(--bpa-pt-main-green, #34d1a5);
}
.bpa-frontend-vue3-root .bpa-is-location-val__summary .bpa-lvs__val .bpa-lvs__val-text {
    font-size: 14px;
    font-weight: normal;
    font-family: var(--bpa-primary-font);
    line-height: 20px;
    color: var(--bpa-dt-black-400, #334155);
}
@media (max-width: 576px) {
    .bpa-frontend-vue3-root .bpa-is-location-val__summary {
        flex-direction: column;
        width: auto;
        margin: 16px 12px 0 12px;
    }
    .bpa-frontend-vue3-root .bpa-is-location-val__summary .bpa-lvs__label {
        padding: 8px 0;
        text-align: center;
        border-radius: var(--bpa-radius-4px, 4px) var(--bpa-radius-4px, 4px) 0 0;
    }
    .bpa-frontend-vue3-root .bpa-is-location-val__summary .bpa-lvs__val {
        padding: 8px 12px;
    }
    .bpa-frontend-vue3-root .bpa-is-location-val__summary .bpa-lvs__val svg {
        margin-right: 6px;
    }
    .bpa-frontend-vue3-root .bpa-is-location-val__summary .bpa-lvs__val .bpa-lvs__val-text {
        text-align: left;
    }
}
