/* McDonald's Store Locator - Frontend Styles */

/* 
 * Font Setup: McDonald's Speedee Font
 * WOFF2 files should be in /fonts/ folder
 */

/* Fallback: Use system fonts that are close to Speedee */
:root {
    --mcd-font: 'Speedee', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Apply font to ALL elements in the store locator */
.mcd-store-locator,
.mcd-store-locator *,
.mcd-store-locator h1,
.mcd-store-locator h2,
.mcd-store-locator h3,
.mcd-store-locator h4,
.mcd-store-locator h5,
.mcd-store-locator h6,
.mcd-store-locator p,
.mcd-store-locator span,
.mcd-store-locator a,
.mcd-store-locator div,
.mcd-store-locator button {
    font-family: var(--mcd-font) !important;
}

/* Container */
.mcd-store-locator {
    font-family: var(--mcd-font) !important;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Map */
.mcd-map {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Location Status */
.mcd-location-status {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #FFC72C 0%, #FFCD41 100%);
    color: #292929;
    border-radius: 12px;
    margin-bottom: 20px;
    font-family: var(--mcd-font) !important;
    font-weight: 700;
    font-size: 15px;
}

.mcd-location-status.visible {
    display: flex;
}

.mcd-loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #DA291C;
    border-radius: 50%;
    animation: mcd-spin 0.8s linear infinite;
}

@keyframes mcd-spin {
    to { transform: rotate(360deg); }
}

/* Store List */
.mcd-store-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

/* Store Card */
.mcd-store-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.mcd-store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.mcd-store-card.closest {
    border: 3px solid #00A651;
}

.mcd-store-card.closest::before {
    content: '📍 CLOSEST LOCATION';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #00A651 0%, #008C43 100%);
    color: #fff;
    padding: 10px 16px;
    font-family: var(--mcd-font) !important;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.mcd-store-card.closest .mcd-store-card-inner {
    padding-top: 42px;
}

.mcd-store-card-inner {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
}

/* Store Image */
.mcd-store-image {
    width: 140px;
    height: 100%;
    min-height: 200px;
    overflow: hidden;
}

.mcd-store-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mcd-store-image-placeholder {
    background: linear-gradient(135deg, #FFC72C 0%, #FFCD41 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

/* Store Info */
.mcd-store-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mcd-store-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.mcd-store-header-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.mcd-store-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mcd-24hr-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #00A651 0%, #008C43 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.mcd-apply-btn {
    display: inline-flex;
    align-items: center;
    background: #DA291C;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mcd-apply-btn:hover {
    background: #B5231A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 41, 28, 0.3);
}

.mcd-store-name {
    font-family: var(--mcd-font) !important;
    font-size: 22px;
    font-weight: 700;
    color: #292929;
    margin: 0;
    letter-spacing: -0.02em;
}

.mcd-store-id {
    font-family: var(--mcd-font) !important;
    font-size: 13px;
    color: #666;
    font-weight: 700;
}

.mcd-store-address {
    font-family: var(--mcd-font) !important;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    font-weight: 400;
}

.mcd-store-phone a {
    font-family: var(--mcd-font) !important;
    color: #DA291C;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.mcd-store-phone a:hover {
    text-decoration: underline;
}

.mcd-store-distance {
    font-family: var(--mcd-font) !important;
    font-size: 14px;
    color: #00A651;
    font-weight: 700;
}

/* Delivery Links */
.mcd-delivery-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    align-items: center;
}

.mcd-delivery-link {
    display: inline-block;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
}

.mcd-delivery-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mcd-delivery-link img {
    display: block;
    height: 44px;
    width: auto;
    border-radius: 8px;
}

/* Mobile Order Button */
.mcd-delivery-order {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #FFC72C 0%, #FFCD41 100%);
    color: #292929;
    font-family: var(--mcd-font) !important;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 199, 44, 0.4);
}

.mcd-delivery-order:hover {
    background: linear-gradient(135deg, #FFD54F 0%, #FFDB58 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 199, 44, 0.5);
}

.mcd-delivery-order svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Amenities */
.mcd-store-amenities {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.mcd-amenity {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f9f9f9;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.mcd-amenity:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.mcd-amenity img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mcd-amenity-text {
    font-size: 10px;
    color: #666;
    text-align: center;
    line-height: 1.1;
}

/* Amenity Tooltip */
.mcd-amenity::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #292929;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mcd-amenity::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #292929;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.mcd-amenity:hover::after,
.mcd-amenity:hover::before {
    opacity: 1;
    visibility: visible;
}

/* No Stores */
.mcd-no-stores {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

/* Map Info Window */
.mcd-info-window {
    padding: 12px;
    max-width: 280px;
}

.mcd-info-window h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #292929;
}

.mcd-info-window p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.mcd-info-window .mcd-info-directions {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: #DA291C;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.mcd-info-window .mcd-info-directions:hover {
    background: #B5231A;
}

/* Responsive */
@media (max-width: 900px) {
    .mcd-store-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .mcd-store-locator {
        padding: 12px;
    }
    
    .mcd-map {
        height: 300px;
        border-radius: 12px;
    }
    
    .mcd-store-card-inner {
        grid-template-columns: 1fr;
    }
    
    .mcd-store-image {
        width: 100%;
        height: 160px;
        min-height: auto;
    }
    
    .mcd-store-card.closest .mcd-store-card-inner {
        padding-top: 0;
    }
    
    .mcd-store-card.closest .mcd-store-image {
        margin-top: 42px;
    }
    
    .mcd-store-info {
        padding: 16px;
    }
    
    .mcd-store-name {
        font-size: 18px;
    }
    
    .mcd-delivery-links {
        gap: 8px;
    }
    
    .mcd-delivery-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .mcd-delivery-link span {
        display: none;
    }
    
    .mcd-delivery-link img {
        width: 24px;
        height: 24px;
    }
}

/* Custom Map Marker - McDonald's Golden Arches */
.mcd-custom-marker {
    background: transparent !important;
    border: none !important;
}

.mcd-marker-inner {
    width: 44px;
    height: 44px;
    background: #DA291C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
    transition: transform 0.2s ease;
    position: relative;
    border: 3px solid #fff;
}

.mcd-marker-inner::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid #DA291C;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

.mcd-marker-inner:hover {
    transform: scale(1.15);
}

.mcd-marker-inner img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* User Location Marker */
.mcd-user-marker {
    background: transparent !important;
    border: none !important;
}

.mcd-user-dot {
    width: 20px;
    height: 20px;
    background: #4285F4;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Leaflet Popup Styles */
.mcd-popup {
    padding: 4px;
    min-width: 200px;
}

.mcd-popup h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #292929;
}

.mcd-popup p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.mcd-popup-directions {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #DA291C 0%, #B5231A 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mcd-popup-directions:hover {
    background: linear-gradient(135deg, #B5231A 0%, #8B1A14 100%);
    transform: translateY(-1px);
}

/* Override Leaflet popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 12px 16px;
}
