/**
 * WP Store Locator Extended Styles
 * Styles for the next/previous store navigation links in tooltips
 */

/* Navigation container */
.wpsl-extended-nav {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* Navigation links container - no animations, instant appearance */
.wpsl-extended-nav {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    opacity: 1;
}

/* Navigation links container */
.wpsl-extended-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Individual navigation links */
.wpsl-extended-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #0073aa;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wpsl-extended-link:hover {
    background-color: #005a87;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wpsl-extended-link:focus {
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

.wpsl-extended-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Loading state for buttons */
.wpsl-extended-link.loading {
    opacity: 0.7;
    pointer-events: none;
    animation: wpslPulse 1s ease-in-out infinite;
}

@keyframes wpslPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.9; }
}

/* Previous store link styling */
.wpsl-extended-prev {
    background-color: #666666 !important;
}

.wpsl-extended-prev:hover {
    background-color: #4a4a4a !important;
}

/* Next store link styling */  
.wpsl-extended-next {
    background-color: #0073aa !important;
}

.wpsl-extended-next:hover {
    background-color: #005a87 !important;
}

/* Separator between links */
.wpsl-extended-separator {
    color: #666666;
    font-weight: bold;
    margin: 0 5px;
}

/* Loading state */
.wpsl-extended-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666666;
    font-size: 13px;
    padding: 10px;
}

.wpsl-extended-loading::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: wpsl-extended-spin 1s linear infinite;
}

/* Error/no stores message */
.wpsl-extended-no-stores,
.wpsl-extended-error {
    color: #666666;
    font-size: 12px;
    font-style: italic;
    text-align: center;
    padding: 8px;
}

.wpsl-extended-error {
    color: #d63638;
}

/* Spinner animation */
@keyframes wpsl-extended-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 480px) {
    .wpsl-extended-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .wpsl-extended-separator {
        display: none;
    }
    
    .wpsl-extended-link {
        width: 100%;
        text-align: center;
        padding: 10px 16px;
    }
}

/* Integration with common info window styles */
.wpsl-info-window .wpsl-extended-nav {
    margin-top: 12px;
    padding-top: 12px;
}

/* Alternative styling for different themes */
.wpsl-extended-nav.wpsl-theme-minimal .wpsl-extended-link {
    background-color: transparent;
    color: #0073aa !important;
    border: 1px solid #0073aa;
}

.wpsl-extended-nav.wpsl-theme-minimal .wpsl-extended-link:hover {
    background-color: #0073aa;
    color: #ffffff !important;
}

.wpsl-extended-nav.wpsl-theme-minimal .wpsl-prev-store {
    color: #666666 !important;
    border-color: #666666;
}

.wpsl-extended-nav.wpsl-theme-minimal .wpsl-prev-store:hover {
    background-color: #666666;
    color: #ffffff !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wpsl-extended-link {
        border: 2px solid #000000;
    }
    
    .wpsl-extended-link:hover {
        border-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wpsl-extended-link {
        transition: none;
    }
    
    .wpsl-extended-link:hover {
        transform: none;
    }
    
    .wpsl-extended-loading::before {
        animation: none;
        border-top-color: #666666;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wpsl-extended-nav {
        border-top-color: #404040;
    }
    
    .wpsl-extended-loading,
    .wpsl-extended-no-stores,
    .wpsl-extended-separator {
        color: #cccccc;
    }
    
    .wpsl-extended-error {
        color: #ff6b6b;
    }
}

/* Focus visible support for better accessibility */
.wpsl-extended-link:focus-visible {
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

/* Print styles - hide navigation in print */
@media print {
    .wpsl-extended-nav {
        display: none;
    }
}