/**
 * Google Maps Medical Locations Frontend CSS
 * Legent Brand Colors: Primary #041367, Accent #FBC61E
 */

/* Map Container - Centered Full Width */
.gmlm-map-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(4, 19, 103, 0.15);
    margin: 20px auto;
    width: 100%;
    max-width: 100%;
    z-index: 1; /* Ensure proper layering for touch events */
    touch-action: pan-x pan-y; /* Allow map panning but improve marker touch response */
}

.gmlm-map {
    border-radius: 8px;
    position: relative;
    z-index: 2; /* Ensure markers are above background elements */
    touch-action: manipulation; /* Improve touch response on mobile */
}

/* Loading State */
.gmlm-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 10;
}

.gmlm-loading p {
    margin: 0;
    color: #041367;
    font-weight: 500;
}

/* Error Message */
.gmlm-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Network Error Message */
.gmlm-error.gmlm-network-error {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* API Error Message */
.gmlm-error.gmlm-api-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Temporary Error Message */
.gmlm-error.gmlm-temp-error {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Error Messages in Results */
.gmlm-results .gmlm-error {
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 2px solid #f5c6cb;
}

/* Hover Card Styling - Blue Background Theme */
.gmlm-hover-card {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.4;
    background: #041367 !important;
    border: 2px solid #FBC61E !important;
    color: white !important;
}

.gmlm-hover-card h4 {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    font-weight: 700 !important;
    color: white !important;
}

.gmlm-hover-card p {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    color: #FBC61E !important;
}

.gmlm-hover-card button {
    transition: all 0.2s ease;
}

.gmlm-hover-card button:hover {
    background: white !important;
    color: #041367 !important;
    transform: translateY(-1px);
}

/* Modal Styling */
.gmlm-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(4, 19, 103, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Bio Modal Styling - Legent Spine */
.gmlm-bio-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 24, 151, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.gmlm-bio-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.gmlm-bio-modal-content {
    background: linear-gradient(135deg, #051897 0%, #0a2bb5 100%);
    border-radius: 16px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 3px #FBC61E;
    border: 3px solid #FBC61E;
}

.gmlm-bio-modal.show .gmlm-bio-modal-content {
    transform: scale(1);
}

.gmlm-bio-modal-header {
    position: relative;
    padding: 20px 20px 0 20px;
    text-align: right;
}

.gmlm-bio-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 70px;
    cursor: pointer;
    color: #FBC61E;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.gmlm-bio-modal-close:hover {
    background: rgba(251, 198, 30, 0.2);
    color: #FFFFFF;
    transform: scale(0.95) translateY(2px);
    box-shadow: 0 2px 8px rgba(251, 198, 30, 0.4) inset;
}

.gmlm-bio-modal-close:active {
    transform: scale(0.9) translateY(4px);
    box-shadow: 0 4px 12px rgba(251, 198, 30, 0.6) inset;
}

.gmlm-bio-modal-body {
    padding: 20px 40px 40px 40px;
}

.gmlm-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.gmlm-modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gmlm-modal.show .gmlm-modal-content {
    transform: scale(1);
}

.gmlm-modal-header {
    position: relative;
    padding: 25px 25px 0 25px;
    text-align: center;
}

.gmlm-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.gmlm-modal-close:hover {
    background: #f0f0f0;
    color: #041367;
}

.gmlm-modal-body {
    padding: 20px 25px 30px 25px;
}

.gmlm-physician-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #FBC61E;
    margin-bottom: 20px;
}

.gmlm-physician-name {
    font-size: 24px;
    font-weight: 700;
    color: #041367;
    margin: 0 0 8px 0;
}

.gmlm-physician-specialty {
    font-size: 16px;
    color: #666;
    margin: 0 0 20px 0;
    font-weight: 500;
}

.gmlm-physician-bio {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin: 0 0 20px 0;
}

.gmlm-physician-contact {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.gmlm-physician-contact h4 {
    font-size: 16px;
    color: #041367;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.gmlm-physician-contact p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #555;
}

.gmlm-physician-contact a {
    color: #041367;
    text-decoration: none;
    font-weight: 500;
}

.gmlm-physician-contact a:hover {
    text-decoration: underline;
}

/* Info Window Styling - Legent Spine Enhanced */
.gmlm-info-window {
    max-width: 280px;
    min-width: 240px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.3;
    text-align: center;
    transition: all 0.2s ease;
    background: #051897 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 8px 24px rgba(5, 24, 151, 0.3) !important;
    border: 2px solid #FBC61E !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
    backface-visibility: hidden !important;
}

.gmlm-info-window:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(5, 24, 151, 0.4) !important;
}

.gmlm-info-window h3 {
    color: #FFFFFF !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    border: none !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.gmlm-info-window p {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

.gmlm-info-window strong {
    color: #041367 !important;
    font-weight: 600 !important;
}

.gmlm-info-window a {
    color: #041367 !important;
    text-decoration: none !important;
}

.gmlm-info-window a:hover {
    text-decoration: underline !important;
}

/* Legent Spine CTA Buttons */
.gmlm-cta-button {
    background: #FBC61E !important;
    color: #051897 !important;
    padding: 12px 20px !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    border: 2px solid #FBC61E !important;
    font-size: 14px !important;
    margin: 6px 4px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(251, 198, 30, 0.3) !important;
    min-width: 100px !important;
    text-align: center !important;
    -webkit-tap-highlight-color: transparent !important;
    tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    will-change: transform !important;
}

.gmlm-cta-button:hover {
    background: #E6B01A !important;
    color: #051897 !important;
    transform: translateY(2px) scale(0.98) !important;
    box-shadow: 0 1px 4px rgba(251, 198, 30, 0.6) inset, 0 2px 8px rgba(251, 198, 30, 0.3) !important;
    text-decoration: none !important;
}

.gmlm-cta-button:active {
    transform: translateY(3px) scale(0.96) !important;
    box-shadow: 0 2px 6px rgba(251, 198, 30, 0.8) inset !important;
}

.gmlm-cta-buttons-container {
    margin-top: 15px !important;
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

/* Phone Link Styling */
.gmlm-phone-link span {
    color: #ffffff !important;
    filter: brightness(0) invert(1) !important;
    text-shadow: none !important;
}

.gmlm-phone-link:hover {
    background: rgba(251, 198, 30, 0.1) !important;
    transform: translateY(2px) scale(0.98) !important;
    box-shadow: 0 1px 4px rgba(251, 198, 30, 0.4) inset, 0 2px 8px rgba(251, 198, 30, 0.3) !important;
    border-color: #FFFFFF !important;
    color: #FFFFFF !important;
}

.gmlm-phone-link:hover span {
    color: #ffffff !important;
    filter: brightness(0) invert(1) !important;
}

.gmlm-phone-link:active {
    transform: translateY(3px) scale(0.96) !important;
    box-shadow: 0 2px 6px rgba(251, 198, 30, 0.6) inset !important;
}

/* Photo in Info Window */
.gmlm-info-photo img {
    border-radius: 6px !important;
    border: 2px solid #f0f0f0 !important;
    margin-bottom: 12px !important;
}

/* Responsive Design */

/* Large screens (desktops) */
@media (min-width: 1200px) {
    .gmlm-map-container {
        margin: 30px 0;
    }
    
    .gmlm-map {
        min-height: 700px;
    }
}

/* Medium screens (tablets and small desktops) */
@media (max-width: 1199px) and (min-width: 769px) {
    .gmlm-map-container {
        margin: 25px 0;
    }
    
    .gmlm-map {
        min-height: 650px;
    }
}

/* Small screens (tablets) */
@media (max-width: 768px) {
    .gmlm-map-container {
        margin: 15px 0;
        border-radius: 6px;
        width: 100%;
    }
    
    .gmlm-map {
        min-height: 550px;
    }
    
    .gmlm-info-window {
        max-width: 260px;
        min-width: 220px;
        padding: 18px !important;
    }
    
    .gmlm-info-window h3 {
        font-size: 16px !important;
    }
    
    .gmlm-info-window p {
        font-size: 13px !important;
    }
    
    .gmlm-cta-button {
        width: 100% !important;
        margin: 4px 0 !important;
        padding: 14px 18px !important;
        font-size: 14px !important;
        min-height: 44px !important;
    }
    
    .gmlm-cta-buttons-container {
        flex-direction: column !important;
        gap: 6px !important;
    }
    
    .gmlm-bio-modal-content {
        width: 95% !important;
        max-height: 90vh !important;
    }
    
    .gmlm-bio-modal-body {
        padding: 15px 25px 30px 25px !important;
    }
}

/* Extra small screens (mobile) */
@media (max-width: 480px) {
    .gmlm-map-container {
        margin: 10px 0;
        border-radius: 4px;
        width: 100%;
    }
    
    .gmlm-map {
        min-height: 500px;
    }
    
    .gmlm-info-window {
        max-width: 240px;
        min-width: 200px;
        padding: 16px !important;
    }
    
    .gmlm-info-window h3 {
        font-size: 15px !important;
        margin-bottom: 8px !important;
    }
    
    .gmlm-info-window p {
        font-size: 12px !important;
        margin-bottom: 8px !important;
    }
    
    .gmlm-cta-button {
        width: 100% !important;
        margin: 3px 0 !important;
        padding: 12px 16px !important;
        font-size: 13px !important;
        min-height: 44px !important;
    }
    
    .gmlm-cta-buttons-container {
        flex-direction: column !important;
        gap: 4px !important;
        margin-top: 12px !important;
    }
    
    .gmlm-bio-modal-content {
        width: 98% !important;
        max-height: 95vh !important;
        border-radius: 12px !important;
    }
    
    .gmlm-bio-modal-body {
        padding: 10px 20px 25px 20px !important;
    }
    
    .gmlm-bio-modal-close {
        width: 110px !important;
        height: 110px !important;
        font-size: 60px !important;
        top: 10px !important;
        right: 15px !important;
    }
    
    /* Modal responsive styles for mobile */
    .gmlm-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
        border-radius: 16px;
        -webkit-overflow-scrolling: touch;
    }
    
    .gmlm-modal-header {
        padding: 20px 20px 0 20px;
        position: sticky;
        top: 0;
        background: white;
        border-radius: 16px 16px 0 0;
        z-index: 1;
    }
    
    .gmlm-modal-body {
        padding: 15px 20px 25px 20px;
        -webkit-overflow-scrolling: touch;
    }
    
    .gmlm-modal-close {
        -webkit-tap-highlight-color: transparent;
        tap-highlight-color: transparent;
        touch-action: manipulation;
        min-width: 44px;
        min-height: 44px;
    }
    
    .gmlm-physician-photo {
        width: 100px;
        height: 100px;
    }
    
    .gmlm-physician-name {
        font-size: 20px;
    }
    
    .gmlm-physician-specialty {
        font-size: 14px;
    }
    
    .gmlm-physician-bio {
        font-size: 14px;
    }
    
    /* Touch-friendly mobile improvements */
    .gmlm-physician-card {
        padding: 15px;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(4, 19, 103, 0.1);
        tap-highlight-color: rgba(4, 19, 103, 0.1);
    }
    
    .gmlm-physician-card-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .gmlm-see-more-btn,
    .gmlm-show-on-map-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px; /* iOS touch target minimum */
        -webkit-tap-highlight-color: transparent;
        tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .gmlm-search-btn,
    .gmlm-clear-btn {
        min-height: 44px;
        min-width: 44px;
        -webkit-tap-highlight-color: transparent;
        tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .gmlm-search-input {
        font-size: 20px; /* Larger for better visibility, still prevents zoom on iOS */
        padding: 16px 20px;
        min-height: 48px;
        font-weight: 600;
        letter-spacing: 0.3px;
        line-height: 1.3;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .gmlm-search-header h3 {
        font-size: 28px !important;
        color: white !important;
        font-weight: bold !important;
    }
    
    .gmlm-search-header p {
        font-size: 14px;
    }
}

/* Google Maps Controls Customization */
.gm-style .gm-style-iw-gm {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(4, 19, 103, 0.15) !important;
}

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

/* Map Type Controls */
.gm-style .gm-style-mtc {
    background: white !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(4, 19, 103, 0.1) !important;
}

/* Zoom Controls */
.gm-style .gm-bundled-control {
    background: white !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(4, 19, 103, 0.1) !important;
}

/* Fullscreen Control */
.gm-style .gm-fullscreen-control {
    background: white !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(4, 19, 103, 0.1) !important;
}

/* Street View Control */
.gm-style .gm-svpc {
    background: white !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(4, 19, 103, 0.1) !important;
}

/* Nearest Location Finder Styles */
.gmlm-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.gmlm-finder-container {
    margin: 0 auto 20px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(4, 19, 103, 0.15);
    border: 2px solid #f0f0f0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

/* Search Header */
.gmlm-search-header {
    background: linear-gradient(135deg, #041367 0%, #0519a3 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative !important;
    min-height: 80px !important;
}

.gmlm-search-header h3 {
    color: #FFFFFF !important;
    font-weight: 900 !important;
    margin: 0 0 12px 0 !important;
    font-size: 36px !important;
    font-family: 'Georgia', 'Times New Roman', serif !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 1px !important;
    line-height: 1.2 !important;
    /* Remove gradient text to ensure solid white color */
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #FFFFFF !important;
    text-fill-color: #FFFFFF !important;
    /* Strong white color override for Elementor compatibility */
    background-color: transparent !important;
}

/* Legent Spine Logo in Header - Top Left Positioned */
.gmlm-logo {
    position: absolute !important;
    top: 10px !important;
    left: 15px !important;
    height: 40px !important;
    width: auto !important;
    max-width: 120px !important;
    margin: 0 !important;
    z-index: 10 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Tablet responsive logo (768px and down) */
@media (max-width: 768px) {
    .gmlm-logo {
        height: 32px !important;
        top: 12px !important;
        left: 12px !important;
        max-width: 100px !important;
    }
}

/* Mobile responsive logo (480px and down) */
@media (max-width: 480px) {
    .gmlm-logo {
        height: 24px !important;
        top: 10px !important;
        left: 10px !important;
        max-width: 80px !important;
    }
}

.gmlm-search-header p {
    margin: 0 !important;
    font-size: 18px !important;
    opacity: 0.95 !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
    letter-spacing: 0.5px !important;
}

/* Creative header mobile responsiveness */
@media (max-width: 768px) {
    .gmlm-search-header h3 {
        font-size: 28px !important;
        letter-spacing: 0.5px !important;
        margin: 0 0 10px 0 !important;
    }
    
    .gmlm-search-header p {
        font-size: 16px !important;
        letter-spacing: 0.3px !important;
    }
}

@media (max-width: 480px) {
    .gmlm-search-header h3 {
        font-size: 24px !important;
        letter-spacing: 0.3px !important;
    }
    
    .gmlm-search-header p {
        font-size: 15px !important;
    }
}

.gmlm-search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 3px solid #041367;
    border-radius: 16px;
    padding: 6px;
    margin: 20px;
    box-shadow: 0 6px 16px rgba(4, 19, 103, 0.2);
    transition: all 0.3s ease;
    min-height: 60px;
}

.gmlm-search-box:focus-within {
    border-color: #FBC61E;
    box-shadow: 0 6px 20px rgba(251, 198, 30, 0.35);
    transform: translateY(-1px);
}

.gmlm-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 20px;
    font-size: 20px;
    color: #041367;
    background: transparent;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.3px;
    width: 100%;
}

.gmlm-search-input::placeholder {
    color: #777 !important;
    font-weight: 600 !important;
    opacity: 0.8 !important;
    font-size: 24px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.3 !important;
}

.gmlm-search-input::-webkit-input-placeholder {
    color: #777 !important;
    font-weight: 600 !important;
    opacity: 0.8 !important;
    font-size: 24px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.3 !important;
}

.gmlm-search-input::-moz-placeholder {
    color: #777 !important;
    font-weight: 600 !important;
    opacity: 0.8 !important;
    font-size: 24px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.3 !important;
}

/* Mobile responsive placeholder text */
@media (max-width: 768px) {
    .gmlm-search-input::placeholder,
    .gmlm-search-input::-webkit-input-placeholder,
    .gmlm-search-input::-moz-placeholder {
        font-size: 18px !important;
        letter-spacing: 0.3px !important;
    }
}

/* Extra small mobile responsive placeholder text */
@media (max-width: 480px) {
    .gmlm-search-input::placeholder,
    .gmlm-search-input::-webkit-input-placeholder,
    .gmlm-search-input::-moz-placeholder {
        font-size: 16px !important;
        letter-spacing: 0.2px !important;
    }
}

.gmlm-search-btn {
    background: #008C00 !important; /* Dark Green override for Phase 2 */
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 16px 24px !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-width: 80px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-image: none !important;
    box-shadow: 0 4px 12px rgba(0, 140, 0, 0.3) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    /* Continuous pulsing animation */
    animation: gmlm-pulse-button 2s ease-in-out infinite !important;
}

/* Pulsing animation keyframes - Dark Green */
@keyframes gmlm-pulse-button {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 140, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0, 140, 0, 0.5);
    }
}

.gmlm-search-btn:hover {
    background: #007A00 !important; /* Darker green on hover */
    color: white !important;
    transform: scale(1.08) !important;
    box-shadow: 0 6px 20px rgba(0, 140, 0, 0.6) !important;
    animation: none !important; /* Stop pulsing on hover */
}

.gmlm-search-btn:active {
    transform: scale(0.95) !important;
    box-shadow: 0 2px 8px rgba(0, 140, 0, 0.8) inset !important;
    background: #006B00 !important; /* Even darker green when active */
}

/* Mobile responsive button */
@media (max-width: 768px) {
    .gmlm-search-btn {
        font-size: 20px !important;
        padding: 14px 20px !important;
        min-width: 70px !important;
        height: 50px !important;
        letter-spacing: 0.5px !important;
    }
}

@media (max-width: 480px) {
    .gmlm-search-btn {
        font-size: 18px !important;
        padding: 12px 18px !important;
        min-width: 60px !important;
        height: 46px !important;
        letter-spacing: 0.3px !important;
    }
}

.gmlm-clear-btn {
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gmlm-clear-btn:hover {
    background: #e0e0e0;
    color: #333;
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) inset;
}

.gmlm-clear-btn:active {
    transform: translateY(3px) scale(0.96);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) inset;
}

/* Search Results */
.gmlm-results {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(4, 19, 103, 0.15);
    margin-top: 16px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
}

.gmlm-results-header {
    background: linear-gradient(135deg, #041367 0%, #0519a3 100%);
    color: white;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
}

.gmlm-searching {
    padding: 30px 20px;
    text-align: center;
    color: #041367;
    font-weight: 600;
    font-size: 16px;
    position: relative;
}

.gmlm-searching::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #041367;
    border-radius: 50%;
    animation: gmlmSpin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

.gmlm-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.gmlm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #041367;
    border-radius: 50%;
    animation: gmlmSpin 1s linear infinite;
}

.gmlm-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #041367;
    border-radius: 50%;
    animation: gmlmSpin 1s linear infinite;
}

.gmlm-button-loading {
    position: relative;
    color: transparent !important;
}

.gmlm-button-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: gmlmSpin 1s linear infinite;
}

.gmlm-result-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gmlm-result-item:last-child {
    border-bottom: none;
}

.gmlm-result-item:hover {
    background: #f8f9ff;
    transform: translateX(4px);
}

.gmlm-result-item.gmlm-closest {
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border-left: 4px solid #FBC61E;
}

.gmlm-result-item.gmlm-closest:hover {
    background: linear-gradient(135deg, #fff6d9 0%, #fff8e6 100%);
}

.gmlm-closest-badge {
    background: #FBC61E;
    color: #041367;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gmlm-result-title {
    font-size: 20px;
    font-weight: 700;
    color: #041367;
    margin-bottom: 8px;
    line-height: 1.3;
}

.gmlm-result-distance {
    font-size: 24px;
    font-weight: 800;
    color: #FBC61E;
    margin-bottom: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.gmlm-result-address {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.gmlm-result-phone {
    color: #041367;
    font-size: 14px;
    font-weight: 600;
}

/* Physician Card Layout */
.gmlm-physician-card {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

.gmlm-physician-card:last-child {
    border-bottom: none;
}

.gmlm-physician-card:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 19, 103, 0.1);
}

.gmlm-physician-card.gmlm-closest {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4fd 100%);
    border-left: 4px solid #FBC61E;
}

.gmlm-physician-card-image {
    flex-shrink: 0;
    margin-right: 20px;
}

.gmlm-physician-card-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FBC61E;
}

.gmlm-physician-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #041367 0%, #0519a3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.gmlm-physician-card-info {
    flex: 1;
    min-width: 0;
}

.gmlm-physician-card-name {
    font-size: 20px;
    font-weight: 700;
    color: #041367;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.gmlm-physician-card-distance {
    font-size: 16px;
    font-weight: 600;
    color: #FBC61E;
    margin: 0 0 6px 0;
}

.gmlm-physician-card-specialty {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.gmlm-physician-card-address {
    font-size: 13px;
    color: #888;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.gmlm-physician-card-actions {
    display: flex;
    gap: 10px;
}

.gmlm-see-more-btn {
    background: #FBC61E;
    color: #041367;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gmlm-see-more-btn:hover {
    background: #041367;
    color: #FBC61E;
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 1px 4px rgba(4, 19, 103, 0.4) inset, 0 2px 8px rgba(4, 19, 103, 0.3);
}

.gmlm-see-more-btn:active {
    transform: translateY(3px) scale(0.96);
    box-shadow: 0 2px 6px rgba(4, 19, 103, 0.6) inset;
}

.gmlm-show-on-map-btn {
    background: white;
    color: #041367;
    border: 2px solid #041367;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gmlm-show-on-map-btn:hover {
    background: #041367;
    color: white;
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 1px 4px rgba(4, 19, 103, 0.4) inset, 0 2px 8px rgba(4, 19, 103, 0.3);
}

.gmlm-show-on-map-btn:active {
    transform: translateY(3px) scale(0.96);
    box-shadow: 0 2px 6px rgba(4, 19, 103, 0.6) inset;
}

.gmlm-error {
    background: #ffebee;
    color: #c62828;
    padding: 16px 20px;
    text-align: center;
    font-weight: 600;
}

/* Responsive Design for Location Finder */
@media (max-width: 768px) {
    .gmlm-finder-container {
        margin-bottom: 16px;
    }
    
    .gmlm-search-box {
        border-radius: 10px;
        padding: 6px;
    }
    
    .gmlm-search-input {
        padding: 14px 18px;
        font-size: 19px;
        font-weight: 600;
        letter-spacing: 0.2px;
    }
    
    .gmlm-search-btn {
        padding: 10px 14px;
        min-width: 44px;
        height: 44px;
        font-size: 16px !important;
        font-weight: bold !important;
        background: #228B22 !important;
        color: white !important;
    }
    
    .gmlm-results-header {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .gmlm-result-item {
        padding: 16px;
    }
    
    .gmlm-result-title {
        font-size: 18px;
    }
    
    .gmlm-result-distance {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .gmlm-search-box {
        border-radius: 8px;
        padding: 4px;
    }
    
    .gmlm-search-input {
        padding: 16px 18px;
        font-size: 20px;
        font-weight: 600;
        letter-spacing: 0.3px;
        min-height: 44px;
        line-height: 1.3;
    }
    
    .gmlm-search-btn {
        padding: 8px 12px;
        min-width: 40px;
        height: 40px;
        font-size: 14px !important;
        font-weight: bold !important;
        background: #228B22 !important;
        color: white !important;
        border-radius: 6px;
    }
    
    .gmlm-results {
        border-radius: 8px;
    }
    
    .gmlm-results-header {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .gmlm-result-item {
        padding: 14px;
    }
    
    .gmlm-result-title {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .gmlm-result-distance {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .gmlm-result-address,
    .gmlm-result-phone {
        font-size: 13px;
    }
    
    .gmlm-closest-badge {
        font-size: 11px;
        padding: 4px 8px;
        margin-bottom: 6px;
    }
}

/* Admin Interface Enhancements */
.gmlm-settings h2,
.gmlm-locations h2 {
    color: #041367;
    border-bottom: 3px solid #FBC61E;
    padding-bottom: 10px;
}

.gmlm-settings .notice,
.gmlm-locations .notice {
    border-left-color: #041367;
}

.gmlm-settings .button-primary,
.gmlm-locations .button-primary {
    background: #041367;
    border-color: #041367;
}

.gmlm-settings .button-primary:hover,
.gmlm-locations .button-primary:hover {
    background: #FBC61E;
    border-color: #FBC61E;
    color: #041367;
}