/**
 * Custom Store Locator Styles - Light Theme (Apple Style)
 *
 * All styles are wrapped under .custom_store_locator class
 * This allows for easy customization and prevents style conflicts
 */

.custom_store_locator {
    .gorilladash-map-card-heading {
        color: #1d1d1f;
        margin: 0 0 8px 0;
        font-size: 1rem;
    }

    .gorilladash-map-address-text {
        color: #1d1d1f;
        margin: 4px 0;
        font-size: 0.85rem;
    }

    .gorilladash-map-phone-text {
        color: #1d1d1f;
        margin: 4px 0;
        font-size: 0.85rem;
    }

    /* Top Search Bar */
    .gorilladash-locator-top-search {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
        background: #FFFFFF;
        border: 1px solid #d2d2d7;
        align-items: center;
        box-sizing: border-box;
        justify-content: flex-start;
    }

    /* Container with left/right panels */
    .gorilladash-store-locator-container {
        display: flex;
        gap: 0;
        height: 600px;
        background: #F5F5F7;
        border: 1px solid #d2d2d7;
        border-top: none;
        border-radius: 0;
    }

    /* Left Panel - Results Only */
    .gorilladash-locator-left-panel {
        flex: 0 0 380px;
        display: flex;
        flex-direction: column;
        background: #FFFFFF;
        color: #1d1d1f;
        overflow: hidden;
        height: 100%;
    }

    /* Find Location Button */
    .gorilladash-find-location-btn {
        flex: 0 0 auto;
        background: transparent;
        color: #1d1d1f;
        border: none;
        border-radius: 4px;
        padding: 10px 12px;
        font-size: 13px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        justify-content: center;
        transition: opacity 0.3s;
        white-space: nowrap;
    }

    .gorilladash-find-location-btn:hover {
        opacity: 0.8;
    }

    .gorilladash-find-location-btn svg {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
        color: #E62525;
    }

    /* Service Filter */
    .gorilladash-service-filter {
        flex: 0 0 auto;
        width: 140px;
        background: #F5F5F7;
        color: #1d1d1f;
        border: 1px solid #d2d2d7;
        border-radius: 4px;
        padding: 10px 30px 10px 10px;
        font-size: 13px;
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231d1d1f' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        box-sizing: border-box;
        text-align: center;
    }

    .gorilladash-service-filter:hover {
        background-color: #e5e5ea;
        border-color: #b8b8bd;
    }

    /* Search Input Wrapper with Icon */
    .gorilladash-search-input-wrapper {
        flex: 1 1 auto;
        min-width: 200px;
        position: relative;
        display: flex;
        align-items: center;
    }

    .gorilladash-search-icon {
        position: absolute;
        left: 12px;
        color: #6e6e73;
        pointer-events: none;
        z-index: 1;
    }

    /* Search Input in Top Bar */
    .gorilladash-locator-top-search .gorilladash-search-address-input {
        flex: 1;
        width: 100%;
        background: #F5F5F7;
        color: #1d1d1f;
        border: 1px solid #d2d2d7;
        border-radius: 4px;
        padding: 10px 12px 10px 40px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .gorilladash-locator-top-search .gorilladash-search-address-input::placeholder {
        color: #6e6e73;
    }

    .gorilladash-locator-top-search .gorilladash-search-address-input:focus {
        outline: none;
        border-color: #007AFF;
        background: #FFFFFF;
        color: #1d1d1f;
    }

    /* Ensure dark text color for Google Places Autocomplete input */
    .gorilladash-locator-top-search .gorilladash-search-address-input.pac-target-input {
        color: #1d1d1f !important;
    }

    /* Red Search Button */
    .gorilladash-search-btn {
        flex: 0 0 auto;
        background: #E62525;
        color: #fff;
        border: none;
        border-radius: 4px;
        padding: 10px 20px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.3s;
        white-space: nowrap;
        box-sizing: border-box;
    }

    .gorilladash-search-btn:hover {
        background: #C62828;
    }

    /* Results Container */
    .gorilladash-locator-results {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        background: #FFFFFF;
        height: 100%;
    }

    /* Custom Scrollbar for Results - Hidden */
    .gorilladash-locator-results::-webkit-scrollbar {
        width: 0;
        display: none;
    }

    .gorilladash-locator-results::-webkit-scrollbar-track {
        display: none;
    }

    .gorilladash-locator-results::-webkit-scrollbar-thumb {
        display: none;
    }

    .gorilladash-locator-results::-webkit-scrollbar-thumb:hover {
        display: none;
    }

    /* Hide scrollbar for Firefox */
    .gorilladash-locator-results {
        scrollbar-width: none;
    }

    /* Hide scrollbar for IE/Edge */
    .gorilladash-locator-results {
        -ms-overflow-style: none;
    }

    .gorilladash-locator-results-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        background: transparent;
    }

    /* Store Card */
    .gorilladash-store-card {
        background: #FFFFFF;
        border: 1px solid #d2d2d7;
        border-radius: 16px;
        padding: 0;
        display: flex;
        flex-direction: column;
        transition: all 0.3s;
        overflow: hidden;
        box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.04);
    }

    .gorilladash-store-card:hover {
        background: #FFFFFF;
        border-color: #b8b8bd;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        transform: translateY(-1px);
    }

    /* Section 1: Name, Rating, Reviews & Image */
    .gorilladash-card-section-1 {
        display: flex;
        gap: 12px;
        padding: 16px;
        border-bottom: 1px solid #e5e5ea;
    }

    .gorilladash-card-left {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 0;
    }

    .gorilladash-store-card-title {
        font-family: 'Gunterz', 'Impact', 'Arial Black', sans-serif !important;
        font-size: 14px;
        font-weight: 700;
        color: #1d1d1f !important;
        margin: 0 0 6px 0;
        line-height: 1.3;
        letter-spacing: 0.3px;
        word-break: break-word;
        word-wrap: break-word;
    }

    /* Star Rating */
    .gorilladash-store-rating {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 4px;
        flex-wrap: nowrap;
    }

    .gorilladash-stars {
        font-size: 13px;
        line-height: 1;
    }

    .gorilladash-star {
        display: inline-block;
    }

    .gorilladash-star-full {
        color: #FFB800;
    }

    .gorilladash-rating-number {
        font-size: 11px;
        color: #1d1d1f;
        font-weight: 600;
    }

    .gorilladash-reviews-count {
        font-size: 10px;
        color: #6e6e73;
        font-weight: 400;
    }

    .gorilladash-status-dot {
        font-size: 13px;
        line-height: 1;
    }

    .gorilladash-status-dot.open {
        color: #34c759;
    }

    .gorilladash-status-dot.closed {
        color: #ff3b30;
    }

    .gorilladash-status-text {
        font-size: 10px;
        font-weight: 500;
    }

    .gorilladash-status-text.open {
        color: #1d1d1f;
    }

    .gorilladash-status-text.closed {
        color: #ff3b30;
    }

    .gorilladash-store-distance {
        font-size: 12px;
        color: #6e6e73;
        font-weight: 500;
    }

    /* Store Card - Image */
    .gorilladash-store-card-image {
        flex-shrink: 0;
        width: 110px;
        height: 75px;
        border-radius: 12px;
        overflow: hidden;
        background: #F5F5F7;
        align-self: flex-start;
    }

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

    /* Section 2: Address, Phone, Hours */
    .gorilladash-card-section-2 {
        padding: 12px 16px;
        border-bottom: 1px solid #e5e5ea;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .gorilladash-store-card-address {
        font-size: 12px;
        color: #1d1d1f;
        line-height: 1.5;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .gorilladash-store-card-phone {
        font-size: 12px;
        color: #007AFF;
        font-weight: 500;
    }

    .gorilladash-store-card-hours {
        font-size: 12px;
        color: #1d1d1f;
        font-weight: 500;
    }

    /* Section 3: Action Buttons */
    .gorilladash-card-section-3 {
        display: flex;
        gap: 8px;
        padding: 12px 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .gorilladash-btn-view-location {
        flex: 1 1 0%;
        max-width: 50%;
        min-width: 0;
        background: transparent;
        color: #007AFF;
        border: 1px solid #007AFF;
        border-radius: 8px;
        padding: 10px 12px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        text-align: center;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
        text-decoration: none;
    }

    .gorilladash-btn-view-location:hover {
        background: #007AFF;
        color: #FFFFFF;
        border-color: #007AFF;
    }

    .gorilladash-btn-request-quote {
        flex: 1 1 0%;
        max-width: 50%;
        min-width: 0;
        background: #007AFF;
        color: #FFFFFF;
        border: none;
        border-radius: 8px;
        padding: 10px 12px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        text-align: center;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
        text-decoration: none;
    }

    .gorilladash-btn-request-quote:hover {
        background: #0051D5;
    }

    /* Right Panel - Map */
    .gorilladash-locator-right-panel {
        flex: 1;
        position: relative;
        height: 100%;
        padding: 1rem;
    }

    .gorilladash-locator-map-wrapper {
        padding: 1rem;
        width: 100%;
        height: 100%;
        position:relative
    }

    .gorilladash-locator-map {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }

    /* Ensure map canvas is same height as container */
    #gorilladash-map-canvas.gorilladash-locator-map {
        height: 100% !important;
    }

    .gorilladash-locator-map-loading {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #F5F5F7;
        color: #6e6e73;
    }

    /* Responsive Design */
    @media (max-width: 1024px) {
        .gorilladash-locator-top-search {
            flex-wrap: wrap;
            gap: 8px;
        }

        .gorilladash-search-input-wrapper {
            flex: 1 1 100%;
        }

        .gorilladash-search-btn {
            flex: 1 1 100%;
        }

        .gorilladash-store-locator-container {
            flex-direction: column;
        }

        .gorilladash-locator-left-panel {
            flex: none;
            max-height: 400px;
        }

        .gorilladash-locator-right-panel {
            min-height: 400px;
        }

        .gorilladash-locator-map {
            min-height: 400px;
        }
    }

    @media (max-width: 768px) {
        .gorilladash-locator-top-search {
            flex-direction: column;
            gap: 10px;
        }

        .gorilladash-find-location-btn,
        .gorilladash-service-filter,
        .gorilladash-search-btn-red {
            width: 100%;
        }

        .gorilladash-service-filter {
            min-width: auto;
        }

        .gorilladash-card-section-1 {
            flex-direction: column;
        }

        .gorilladash-store-card-image {
            width: 100%;
            height: 150px;
            order: -1;
        }

        .gorilladash-card-section-3 {
            gap: 8px;
        }

        .gorilladash-btn-view-location,
        .gorilladash-btn-request-quote {
            max-width: 100%;
        }

        .gorilladash-locator-left-panel {
            flex: none;
            max-height: 50vh;
        }
    }
}
