/**
 * FFLs Integration Styles
 */

/* Main container */
.ffls-locator {
    max-width: 800px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Search form */
.ffls-search-form {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ffls-search-form input[type="text"] {
    width: 70%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.ffls-search-form button {
    width: 25%;
    padding: 10px;
    margin-left: 2%;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.ffls-search-form button:hover {
    background: #005a87;
}

.ffls-search-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* State and city selectors */
.ffls-selectors {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ffls-selector {
    flex: 1;
    min-width: 200px;
}

.ffls-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.ffls-selector select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

/* Loading indicator */
.ffls-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.ffls-loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: ffls-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Results container */
.ffls-results {
    margin-top: 20px;
}

.ffls-results-summary {
    margin-bottom: 15px;
    padding: 10px;
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    font-weight: bold;
}

/* FFL items */
.ffls-ffl-item {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ffls-ffl-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 5px rgba(0, 115, 170, 0.1);
}

.ffls-ffl-name {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 18px;
    font-weight: bold;
}

.ffls-ffl-details p {
    margin: 5px 0;
    color: #666;
    line-height: 1.4;
}

.ffls-ffl-address {
    font-weight: bold;
    color: #333 !important;
}

.ffls-ffl-phone {
    color: #0073aa !important;
}

.ffls-ffl-license {
    font-family: monospace;
    font-size: 13px;
}

.ffls-ffl-type {
    font-style: italic;
}

/* Load more button */
.ffls-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 20px 0;
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
}

.ffls-load-more:hover {
    background: #e7e7e7;
}

/* Modal */
.ffls-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.ffls-modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 5px;
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
}

.ffls-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
}

.ffls-modal-close:hover {
    color: #000;
}

.ffls-modal-body {
    padding: 20px;
}

.ffls-modal-body h3 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.ffls-modal-body p {
    margin: 10px 0;
    line-height: 1.5;
}

.ffls-modal-body strong {
    color: #333;
}

/* List shortcode styles */
.ffls-list {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.ffls-list .ffl-item {
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ffls-list .ffl-item h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 16px;
}

.ffls-list .ffl-item p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .ffls-search-form input[type="text"] {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .ffls-search-form button {
        width: 100%;
        margin-left: 0;
    }
    
    .ffls-selectors {
        flex-direction: column;
    }
    
    .ffls-selector {
        min-width: auto;
    }
    
    .ffls-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .ffls-ffl-name {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .ffls-locator {
        margin: 10px 0;
    }
    
    .ffls-search-form,
    .ffls-ffl-item {
        padding: 10px;
    }
    
    .ffls-modal-content {
        margin: 5% auto;
    }
    
    .ffls-modal-body {
        padding: 15px;
    }
}

/* Print styles */
@media print {
    .ffls-search-form,
    .ffls-load-more,
    .ffls-modal {
        display: none !important;
    }
    
    .ffls-ffl-item {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 10px;
    }
    
    .ffls-ffl-name {
        color: #000 !important;
    }
}

/* Accessibility improvements */
.ffls-ffl-item:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.ffls-search-form input:focus,
.ffls-selector select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 1px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ffls-ffl-item {
        border-color: #000;
    }
    
    .ffls-ffl-item:hover {
        border-color: #000;
        background: #f0f0f0;
    }
    
    .ffls-search-form button {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ffls-ffl-item {
        transition: none;
    }
    
    .ffls-loading:before {
        animation: none;
    }
}

