/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Container Styles */
.gpm-container {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Search Container */
.gpm-search-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gpm-search-box {
    display: flex;
    gap: 10px;
}

.gpm-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.gpm-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.gpm-search-btn {
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpm-search-btn:hover {
    background: #005a87;
}

.gpm-search-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

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

.gpm-filter-select {
    padding: 10px 14px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 150px;
}

/* Map Wrapper */
.gpm-map-wrapper {
    display: flex;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Map Styles */
.gpm-map {
    flex: 1;
    min-height: 400px;
    position: relative;
    background: #f8f9fa;
}

.gpm-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.gpm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: gpm-spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

.gpm-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Sidebar Styles */
.gpm-sidebar {
    width: 350px;
    background: #f8f9fa;
    border-left: 1px solid #e1e5e9;
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

.gpm-sidebar-header {
    /*padding: 20px;*/
    border-bottom: 1px solid #e1e5e9;
    background: white;
}

.gpm-sidebar-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.gpm-sidebar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.gpm-show-all-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gpm-show-all-btn:hover {
    background: #005a87;
}

.gpm-show-all-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.gpm-location-count {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.gpm-location-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Location List Item */
.gpm-location-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5e9;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background: white;
}

.gpm-location-item:hover {
    background: #f0f6fc;
}

.gpm-location-item.active {
    background: #e7f3ff;
    border-left: 4px solid #007cba;
}

.gpm-location-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.gpm-location-address {
    font-size: 14px;
    color: #000;
    line-height: 1.4;
    margin-bottom: 8px;
}

.gpm-location-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #000;
    flex-direction: column;
}

.gpm-location-phone,
.gpm-location-hours {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Modal Styles */
.gpm-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: gpm-fadeIn 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.gpm-modal-content {
    background-color: #fff;
    margin: 0;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: gpm-slideIn 0.3s ease;
}

@keyframes gpm-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gpm-slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.gpm-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gpm-modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

.gpm-modal-body {
    padding: 30px;
}

/* Location Detail Styles */
.gpm-location-detail {
    text-align: left;
}

.gpm-location-detail h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
    padding-right: 40px;
}

.gpm-detail-section {
    margin-bottom: 25px;
}

.gpm-detail-section h3 {
    margin: 0 0 10px 0;
    color: #007cba;
    font-size: 16px;
    font-weight: 600;
}

.gpm-detail-info {
    display: grid;
    gap: 12px;
}

.gpm-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
}

.gpm-detail-icon {
    width: 20px;
    height: 20px;
    color: #666;
    flex-shrink: 0;
    margin-top: 2px;
}

.gpm-detail-text {
    flex: 1;
    line-height: 1.5;
}

.gpm-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.gpm-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gpm-action-btn.primary {
    background: #007cba;
    color: white;
}

.gpm-action-btn.primary:hover {
    background: #005a87;
    color: white;
}

.gpm-action-btn.secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.gpm-action-btn.secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* Office Hours Styles */
.gpm-hours-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gpm-hours-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.gpm-hours-item:last-child {
    border-bottom: none;
}

.gpm-hours-day {
    font-weight: 500;
    color: #333;
}

.gpm-hours-time {
    color: #666;
}

.gpm-hours-closed {
    color: #dc3545;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gpm-map-wrapper {
        flex-direction: column;
    }
    
    .gpm-sidebar {
        width: 100%;
        max-height: 300px;
        order: -1;
    }
    
    .gpm-search-box {
        flex-direction: column;
    }
    
    .gpm-search-filters {
        justify-content: stretch;
    }
    
    .gpm-filter-select {
        min-width: auto;
        flex: 1;
    }
    
    .gpm-modal-content {
        margin: 0;
        width: 95%;
    }
    
    .gpm-modal-body {
        padding: 20px;
    }
    
    .gpm-detail-actions {
        flex-direction: column;
    }
    
    .gpm-action-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .gpm-search-container {
        padding: 15px;
    }
    
    .gpm-location-item {
        padding: 12px 15px;
    }
    
    .gpm-sidebar-header {
        padding: 15px;
    }
    
    .gpm-modal-content {
        margin: 0;
    }
}

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

.leaflet-popup-content {
    margin: 15px;
    line-height: 1.5;
}

.gpm-popup-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.gpm-popup-address {
    color: #000;
    font-size: 14px;
    margin-bottom: 10px;
}

.gpm-popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.gpm-popup-btn {
    padding: 6px 12px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.gpm-popup-btn:hover {
    background: #005a87;
    color: white;
}

/* Loading States */
.gpm-location-list.loading {
    opacity: 0.6;
    pointer-events: none;
}

.gpm-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Accessibility */
.gpm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.gpm-location-item:focus,
.gpm-search-input:focus,
.gpm-filter-select:focus,
.gpm-action-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}
.leaflet-container {
    font-family: inherit !important; 
}
.leaflet-container a{color:#fff !important;}
.leaflet-bar a{color: #0078A8 !important;}
.map-pointer i{
  font-size: 0.9rem;
  color: #000000;
  margin-top: -10px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gpm-search-container,
    .gpm-map-wrapper {
        border-width: 2px;
    }
    
    .gpm-location-item {
        border-bottom-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .gpm-spinner {
        animation: none;
    }
    
    .gpm-modal,
    .gpm-modal-content {
        animation: none;
    }
    
    * {
        transition: none !important;
    }
}
.gpm-sidebar-header h3{
  background: #1c90ae;
  padding: 10px;
  color: #ffffff;
}
.gpm-sidebar-controls{
  padding: 0 10px 10px;
}