/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: white;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    margin-bottom: 10px;
}

.logo {
    max-width: 180px;
    height: auto;
}

.main-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Search Box Styles */
.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
    position: relative;
}

/* Warning Icon and Popup Styles */
.warning-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.first-time-note {
    font-size: 12px;
    color: #666;
    margin-right: 8px;
}

.arrow {
    display: inline-block;
    vertical-align: middle;
    font-size: 14px;
    margin-left: 3px;
}

.warning-icon {
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

.warning-icon:hover {
    transform: scale(1.1);
}

.warning-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    text-align: left;
    margin-top: 10px;
}

.warning-popup p {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.warning-popup.show {
    display: block !important;
}

.search-box {
    width: 100%;
    max-width: 600px;
    margin-bottom: 15px;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #f8f8f8;
    color: #333;
    text-align: center;
}

#search-input::placeholder {
    color: #999;
    text-align: center;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

.search-button {
    width: 150px;
    padding: 8px 16px;
    background-color: #808080;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

.clear-button {
    width: 150px;
    padding: 8px 16px;
    background-color: #808080;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

.search-button:hover, .clear-button:hover {
    background-color: #666;
}

/* Primary Vendors section */
.primary-vendors-container {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.primary-vendors-text {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.primary-vendors-list {
    line-height: 1.4;
    color: #666;
}

/* Results Styles */
.results-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.product-section {
    margin-bottom: 30px;
}

.product-section h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.product-link {
    color: #333;
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}

.product-link:hover {
    color: #555;
}

.product-link:after {
    content: "🔍";
    font-size: 16px;
    margin-left: 10px;
    opacity: 0.6;
}

.product-link:hover:after {
    opacity: 1;
}

/* Product Details Page Styles */
.vendors-found {
    margin-bottom: 20px;
    color: #666;
    font-size: 15px;
    font-style: italic;
}

.vendor-group {
    margin-bottom: 30px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.vendor-group-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
}

.vendor-name-link {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
}

.vendor-name-link:hover {
    color: #555;
}

.vendor-name-link:after {
    content: "→";
    margin-left: 8px;
    font-size: 16px;
    opacity: 0.7;
}

.vendors-label {
    font-weight: bold;
    margin-bottom: 8px;
}

.vendor-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.vendor-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #808080;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.vendor-button:hover {
    background-color: #666;
}

.map-link-button {
    display: inline-block;
    padding: 6px 14px;
    background-color: #808080;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 12px;
    font-size: 13px;
    transition: background-color 0.2s;
}

.map-link-button:hover {
    background-color: #666;
}

.map-link-container {
    margin-top: 8px;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 25px 0;
    opacity: 0.5;
}

.error-message {
    color: #d32f2f;
    background-color: #ffebee;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.info-message {
    color: #1976d2;
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Vendor Details Styles */
.vendor-details-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.nav-buttons-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.back-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #808080;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: #666;
}

.toggle-view-button {
    padding: 8px 16px;
    background-color: #808080;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toggle-view-button:hover {
    background-color: #666;
}

.vendor-name {
    font-size: 26px;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.locations-container {
    margin-top: 20px;
}

.location-card {
    background-color: #f9f9f9;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.location-card h4 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.location-card p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.location-card .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.location-card .contact-icon {
    margin-right: 8px;
    color: #555;
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.location-card .contact-info {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.location-card a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

.location-card a:hover {
    color: #004c99;
}

.no-locations {
    color: #666;
    font-style: italic;
}

/* Map styles */
.map-container {
    width: 100%;
    margin-bottom: 30px;
}

.map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.map-error {
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f8;
    color: #666;
    font-size: 16px;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Google Maps InfoWindow custom styling */
.gm-style .gm-style-iw-c {
    padding: 12px 12px 9px 12px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 7px 1px rgba(0, 0, 0, 0.2) !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
}

.gm-style .gm-style-iw-t::after {
    background: linear-gradient(45deg, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 51%, rgba(255, 255, 255, 0) 100%) !important;
    box-shadow: -2px 2px 2px 0 rgba(178, 178, 178, 0.4) !important;
}

/* Custom link styles for map info windows */
.map-info-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #0066cc;
    margin-bottom: 4px;
    font-size: 13px;
}

.map-info-icon {
    margin-right: 6px;
    color: #555;
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.map-info-text {
    color: #555;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .button-container {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .search-button {
        width: 65%;
        flex-grow: 2;
    }
    
    .clear-button {
        width: 35%;
        flex-grow: 1;
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .vendor-buttons {
        flex-direction: column;
    }
    
    /* Mobile vendor details button improvements */
    .nav-buttons-container {
        display: flex;
        gap: 12px;
    }
    
    .back-button, .toggle-view-button {
        padding: 6px 12px;
        font-size: 13px;
        box-shadow: none;
        margin: 0;
        text-align: center;
        flex: 1;
    }
    
    .back-button {
        flex: 5;
    }
    
    .toggle-view-button {
        flex: 5;
    }
}