/* Gluten-Free Restaurant Finder Styles */
#gluten-free-restaurant-finder {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    background: #f9fafb;
    border-radius: 8px;
    overflow: visible;
    min-height: 600px;
    height: auto;
}

/* Header */
.gfrf-header {
    background: #16a34a;
    color: white;
    padding: 2rem;
    text-align: center;
}

.gfrf-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: bold;
}

.gfrf-header p {
    margin: 0;
    opacity: 0.9;
}

/* Search Section */
.gfrf-search-section {
    background: white;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.gfrf-search-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.gfrf-search-controls input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.gfrf-search-controls input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.gfrf-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.gfrf-btn:hover {
    transform: translateY(-1px);
}

#gfrf-search-btn {
    background: #16a34a;
    color: white;
}

#gfrf-search-btn:hover {
    background: #15803d;
}

.gfrf-location-btn {
    background: #2563eb;
    color: white;
}

.gfrf-location-btn:hover {
    background: #1d4ed8;
}

.gfrf-filter-btn {
    background: #e5e7eb;
    color: #374151;
}

.gfrf-filter-btn:hover {
    background: #d1d5db;
}

.gfrf-filter-btn.active {
    background: #16a34a;
    color: white;
}

#gfrf-location-status {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Error Messages */
.gfrf-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem;
}

.gfrf-error-details {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.gfrf-error-details ul {
    margin: 0.5rem 0;
    padding-left: 1rem;
}

.gfrf-refresh-btn {
    background: #dc2626;
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    margin-left: 1rem;
}

/* Loading */
.gfrf-loading {
    text-align: center;
    padding: 3rem;
}

.gfrf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #16a34a;
    border-radius: 50%;
    animation: gfrf-spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Results */
.gfrf-results {
    padding: 1rem;
    min-height: 400px;
}

.gfrf-results-count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.gfrf-tip-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.gfrf-restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 2rem;
}

/* Restaurant Cards */
.gfrf-restaurant-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.gfrf-restaurant-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gfrf-restaurant-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gfrf-restaurant-content {
    padding: 1.5rem;
}

.gfrf-restaurant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.gfrf-restaurant-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.gfrf-gf-tag {
    background: #dcfce7;
    color: #16a34a;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.gfrf-restaurant-address {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.gfrf-restaurant-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.gfrf-star {
    color: #fbbf24;
    margin-right: 0.25rem;
}

.gfrf-restaurant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.gfrf-action-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

.gfrf-action-btn:hover {
    transform: translateY(-1px);
}

.gfrf-call-btn {
    background: #dbeafe;
    color: #1e40af;
}

.gfrf-call-btn:hover {
    background: #bfdbfe;
}

.gfrf-website-btn {
    background: #f3f4f6;
    color: #374151;
}

.gfrf-website-btn:hover {
    background: #e5e7eb;
}

.gfrf-review-btn {
    background: #f3e8ff;
    color: #7c3aed;
}

.gfrf-review-btn:hover {
    background: #e9d5ff;
}

.gfrf-mark-btn {
    background: #dcfce7;
    color: #16a34a;
}

.gfrf-mark-btn:hover {
    background: #bbf7d0;
}

.gfrf-gf-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #16a34a;
}

.gfrf-hours-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 0.75rem;
}

.gfrf-hours {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* No Results */
.gfrf-no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
}

.gfrf-no-results h3 {
    color: #111827;
    margin-bottom: 0.5rem;
}

.gfrf-no-results p {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Modal */
.gfrf-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gfrf-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.gfrf-modal-close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.gfrf-modal-close:hover {
    color: #dc2626;
}

.gfrf-form-group {
    margin-bottom: 1rem;
}

.gfrf-form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #374151;
}

.gfrf-form-group input,
.gfrf-form-group select,
.gfrf-form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.gfrf-form-group input:focus,
.gfrf-form-group select:focus,
.gfrf-form-group textarea:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.gfrf-form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.gfrf-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.gfrf-btn-primary {
    background: #2563eb;
    color: white;
    flex: 1;
}

.gfrf-btn-primary:hover {
    background: #1d4ed8;
}

.gfrf-btn-secondary {
    background: #d1d5db;
    color: #374151;
    flex: 1;
}

.gfrf-btn-secondary:hover {
    background: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gfrf-search-controls {
        flex-direction: column;
    }
    
    .gfrf-search-controls input {
        min-width: 100%;
    }
    
    .gfrf-search-controls button {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .gfrf-restaurants-grid {
        grid-template-columns: 1fr;
    }
    
    .gfrf-restaurant-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .gfrf-restaurant-actions {
        justify-content: center;
    }
    
    .gfrf-form-actions {
        flex-direction: column;
    }
    
    #gluten-free-restaurant-finder {
        max-height: none;
        height: auto;
    }
}

@media (max-width: 1024px) {
    .gfrf-restaurants-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .gfrf-search-controls {
        flex-wrap: wrap;
    }
    
    .gfrf-search-controls input {
        min-width: 300px;
        flex: 1 1 300px;
    }
    
    .gfrf-search-controls button {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* Widget Specific Styles */
.widget .gfrf-header {
    padding: 1rem;
}

.widget .gfrf-header h2 {
    font-size: 1.5rem;
}

.widget .gfrf-restaurants-grid {
    grid-template-columns: 1fr;
}

.widget .gfrf-search-controls {
    flex-direction: column;
}