/* T9 Store Locator Frontend Styles */

.tnine-store-locator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Search Container */
.tnine-search-container {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.tnine-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tnine-search-box input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.tnine-search-box input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.tnine-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.tnine-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    min-width: 150px;
}

/* Buttons */
.tnine-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tnine-btn-primary {
    background: #0073aa;
    color: #fff;
}

.tnine-btn-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.tnine-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.tnine-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.tnine-btn-small {
    padding: 8px 12px;
    font-size: 12px;
}

.tnine-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Content Wrapper */
.tnine-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    min-height: 500px;
}

/* Map Container */
.tnine-map-container {
    position: relative;
}

#tnine-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* Stores List */
.tnine-stores-list {
    background: #f8f9fa;
    border-left: 1px solid #e9ecef;
    overflow-y: auto;
    max-height: 600px;
}

.tnine-stores-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tnine-stores-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

#tnine-stores-count {
    background: #0073aa;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

#tnine-stores-container {
    padding: 0;
}

/* Store Item */
.tnine-store-item {
    background: #fff;
    margin: 10px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.tnine-store-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tnine-store-item.active {
    border: 2px solid #0073aa;
    background: #f0f8ff;
}

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

.tnine-store-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.tnine-store-distance {
    background: #28a745;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.tnine-store-address {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.tnine-store-address .dashicons {
    color: #0073aa;
    font-size: 16px;
}

/* Categories */
.tnine-store-categories {
    margin-bottom: 10px;
}

.tnine-category-tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Contact Info */
.tnine-store-contact {
    margin-bottom: 15px;
}

.tnine-contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    font-size: 13px;
}

.tnine-contact-item .dashicons {
    color: #0073aa;
    font-size: 14px;
    width: 14px;
}

.tnine-contact-item a {
    color: #0073aa;
    text-decoration: none;
}

.tnine-contact-item a:hover {
    text-decoration: underline;
}

/* Opening Hours */
.tnine-store-hours {
    margin-bottom: 15px;
}

.tnine-store-hours h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.tnine-hours-list {
    font-size: 12px;
}

.tnine-hour-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.tnine-day {
    font-weight: 500;
    color: #333;
    text-transform: capitalize;
}

.tnine-time {
    color: #666;
}

.tnine-closed {
    color: #dc3545;
    font-weight: 500;
}

/* Store Actions */
.tnine-store-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Loading State */
.tnine-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.tnine-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Stores State */
.tnine-no-stores {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.tnine-no-stores-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.tnine-no-stores h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.tnine-no-stores p {
    margin: 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tnine-content-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: 300px 1fr;
    }
    
    .tnine-stores-list {
        border-left: none;
        border-top: 1px solid #e9ecef;
        max-height: 400px;
    }
    
    .tnine-search-box {
        flex-direction: column;
    }
    
    .tnine-search-box input[type="text"] {
        min-width: auto;
    }
    
    .tnine-filters {
        flex-direction: column;
    }
    
    .tnine-filters select {
        min-width: auto;
    }
    
    .tnine-store-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .tnine-store-actions {
        flex-direction: column;
    }
    
    .tnine-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tnine-search-container {
        padding: 15px;
    }
    
    .tnine-store-item {
        margin: 5px;
        padding: 15px;
    }
    
    .tnine-stores-header {
        padding: 15px;
    }
}

/* Google Maps Info Window Customization */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 8px !important;
}

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

.tnine-info-window {
    padding: 15px;
    max-width: 250px;
}

.tnine-info-window h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.tnine-info-window p {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #666;
}

.tnine-info-window .tnine-btn {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

/* Accessibility */
.tnine-store-locator:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.tnine-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tnine-store-locator {
        border: 2px solid #000;
    }
    
    .tnine-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tnine-store-item,
    .tnine-btn,
    .tnine-spinner {
        transition: none;
        animation: none;
    }
} 