/**
 * Retail Locations - Frontend Styles
 * Simplified and override-friendly
 */

/* ==========================================================================
   Base & Variables
   ========================================================================== */

.retail-locations-list,
.retail-locations-map {
    font-size: 1rem;
    line-height: 1.5;
}

/* ==========================================================================
   Map Container
   ========================================================================== */

.retail-locations-map {
    position: relative;
    width: 100%;
}

.retail-locations-map-canvas {
    width: 100%;
    min-height: 18.75em;
}



.retail-locations-map--sticky {
    position: sticky;
    top: 1.25em;
    align-self: flex-start;
}

@media (max-width: 48em) {
    .retail-locations-map--sticky {
        position: static;
    }
}

/* ==========================================================================
   Info Window (Map Markers)
   ========================================================================== */

.retail-locations-info {
    padding: 0.5em;
    max-width: 20em;
}

.retail-locations-info h4 {
    margin: 0 0 0.5em;
    font-size: 1.1em;
    font-weight: bold;
    line-height: 1.3;
}

.retail-locations-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
    margin-bottom: 0.5em;
}

.retail-locations-info-tag {
    display: inline-block;
    padding: 0.15em 0.5em;
    font-size: 0.75em;
    background: #eee;
    color: #333;
}

.retail-locations-info-address {
    margin: 0 0 0.5em;
    font-size: 0.9em;
}

.retail-locations-info-hours {
    margin-bottom: 0.75em;
    font-size: 0.85em;
    background: #f9f9f9;
    padding: 0.5em;
}

.retail-locations-info-hour {
    display: flex;
    gap: 0.5em;
    justify-content: space-between;
}

.retail-locations-info-hour .hour-day {
    font-weight: bold;
}

.retail-locations-info-link {
    display: inline-block;
    padding: 0.4em 0.8em;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-size: 0.85em;
}

.retail-locations-info-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

.retail-locations-info-actions {
    display: flex;
    align-items: center;
    margin-top: 0.5em;
    gap: 0.5em;
}

.retail-locations-info-link-secondary {
    text-decoration: underline;
    font-size: 0.9em;
}

/* ==========================================================================
   Locations List
   ========================================================================== */

/* .retail-locations-list {
    width: 100%;
} */

.retail-locations-list.layout-grid2,
.retail-locations-list.layout-grid3,
.retail-locations-list.layout-grid4 {
    display: grid;
    gap: 1.5em;
}

.retail-locations-list.layout-grid2 {
    grid-template-columns: repeat(2, 1fr);
}

.retail-locations-list.layout-grid3 {
    grid-template-columns: repeat(3, 1fr);
}

.retail-locations-list.layout-grid4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 48em) {

    .retail-locations-list.layout-grid2,
    .retail-locations-list.layout-grid3,
    .retail-locations-list.layout-grid4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Location Item
   ========================================================================== */

.retail-location-item {
    margin: 1em 0;
    border-bottom: 1px solid #eee;
}

.retail-location-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.retail-location-image {
    margin: 0 0 1em;
}

.retail-location-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Title */
.retail-location-title {
    margin: 0 0 0.5em;
    font-size: 1.25em;
    font-weight: bold;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
}

.retail-location-title a {
    color: inherit;
    text-decoration: none;
}

.retail-location-title a:hover {
    text-decoration: underline;
}

/* Category tags */
.retail-location-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3em;
}

.retail-location-tag {
    display: inline-block;
    padding: 0.2em 0.5em;
    font-size: 0.6em;
    font-weight: bold;
    background: #eee;
    color: #333;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Address with icon */
.retail-location-address {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    margin-bottom: 0.75em;
    font-size: 0.95em;
}

.retail-location-apple-link {
    display: none;
    color: inherit;
    text-decoration: none;
    line-height: 0;
    /* Align icon */
}

/* Show only on Apple devices via JS class */
body.has-apple-maps .retail-location-apple-link {
    display: inline-block;
}

.retail-location-apple-link .retail-locations-icon,
.retail-location-address .retail-locations-icon {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.1em;
    flex-shrink: 0;
}

.retail-location-apple-link .retail-locations-icon {
    margin-top: 0;
    /* Reset for link wrapper */
}

.retail-location-address a {
    color: inherit;
    font-weight: 300;
}

.retail-location-address a:hover {
    text-decoration: none;
}

/* Links row (website, instagram) */
.retail-location-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-bottom: 1em;
}

.js-focus-location {
    cursor: pointer;
}

.retail-location-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: inherit;
}

.retail-location-link span {
    font-size: 0.9em;
}

.retail-location-link:hover {
    text-decoration: none;
}

.retail-location-description {
    margin-bottom: 1em;
    font-size: 0.95em;
}

/* Contacts */
.retail-location-contacts {
    margin-bottom: 1em;
    font-size: 0.9em;
}

.retail-location-contact {
    margin-bottom: 0.2em;
}

.retail-location-contact .contact-label {
    font-weight: bold;
    margin-right: 0.3em;
}

/* Hours with icon */
.retail-location-hours {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    font-size: 0.9em;
    margin-top: 1em;
}

.retail-location-hours>.retail-locations-icon {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.15em;
    flex-shrink: 0;
}

.retail-location-hours-list {
    flex: 1;
}

.retail-location-hour {
    display: flex;
    gap: 1em;
    margin-bottom: 0.2em;
    justify-content: space-between;
}

.retail-location-hour .hour-day {
    font-weight: bold;
}

/* ==========================================================================
   SVG Icons
   ========================================================================== */

.retail-locations-icon {
    display: inline-block;
    vertical-align: middle;
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* ==========================================================================
   Grouped Lists
   ========================================================================== */

.retail-locations-group {
    margin-bottom: 1 .5em;
}

.retail-locations-group-title {
    font-size: 1.5em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #ddd;
    max-width: 90%;
}

.retail-locations-group-title[data-lat] {
    cursor: pointer;
}

.retail-locations-group-title[data-lat]:hover {
    opacity: 0.7;
}

/* Grouped layouts reset grid for items within groups */
.retail-locations-list.grouped-by-area .retail-locations-group,
.retail-locations-list.grouped-by-category .retail-locations-group {
    display: block;
}

.retail-locations-list.grouped-by-area.layout-grid2 .retail-location-item,
.retail-locations-list.grouped-by-category.layout-grid2 .retail-location-item {
    display: inline-block;
    width: calc(50% - 0.75em);
    vertical-align: top;
    margin-bottom: 1.5em;
}

.retail-locations-list.grouped-by-area.layout-grid3 .retail-location-item,
.retail-locations-list.grouped-by-category.layout-grid3 .retail-location-item {
    display: inline-block;
    width: calc(33.333% - 1em);
    vertical-align: top;
    margin-bottom: 1.5em;
}

/* ==========================================================================
   Accordion / Collapsible Groups
   ========================================================================== */

.retail-locations-group-content {
    overflow: hidden;
    transition: height 0.3s ease;
}

.retail-locations-group.is-collapsed .retail-locations-group-content {
    height: 0;
}

.retail-locations-list[data-collapsible="yes"] .retail-locations-group-title {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.retail-locations-list[data-collapsible="yes"] .retail-locations-group-title:hover {
    background-color: transparent;
    /* Removed opinionated bg */
    opacity: 0.8;
}

/* Toggle indicator */
.retail-locations-list[data-collapsible="yes"] .retail-locations-group-title::after {
    content: '+';
    display: inline-block;
    font-weight: bold;
    margin-left: 0.5em;
}

.retail-locations-group:not(.is-collapsed)>.retail-locations-group-title::after {
    content: '-';
}