/**
 * OneDFCCI Core Frontend Styles
 *
 * @package OneDFCCI_Core
 */

/* ==========================================================================
   Church Finder Styles
   ========================================================================== */

.onedfcci-church-finder {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* Search Form */
.onedfcci-search-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e9ecef;
}

.finder-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.finder-form .form-group {
    display: flex;
    flex-direction: column;
}

.finder-form label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.finder-form .form-control {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.finder-form .form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.finder-form .form-control:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.search-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.search-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Search Results */
.search-results {
    margin-bottom: 40px;
}

.church-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.church-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.church-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Church Info Column */
.church-info h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.church-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.church-image.placeholder {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
}

.church-details {
    margin-bottom: 25px;
}

.detail-item {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.detail-label {
    font-weight: 600;
    color: #34495e;
    min-width: 90px;
    font-size: 14px;
}

.detail-value {
    color: #2c3e50;
    flex: 1;
    font-size: 14px;
}

.detail-value a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.detail-value a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Pastors and Services */
.pastors-list,
.services-list {
    margin-top: 20px;
}

.section-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.pastor-item,
.service-item {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    /* Removed border-left as requested */
    /* Removed transition effect */
}

/* Removed hover effects as requested */

.pastor-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 5px;
}

.pastor-contact {
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.4;
}

.service-day {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.service-time {
    color: #7f8c8d;
    margin-left: 15px;
    font-size: 14px;
}

/* Church Map Column */
.church-map {
    position: relative;
}

.map-iframe {
    width: 100%;
    height: 350px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.map-placeholder {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
    border: 2px dashed #dee2e6;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: #7f8c8d;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-results h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.no-results p {
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 12px 18px;
    border: 2px solid #e1e5e9;
    background: white;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 44px;
    text-align: center;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
}

.pagination-btn.current {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-color: #3498db;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-info {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0 20px;
    font-weight: 500;
}

/* ==========================================================================
   Church Registration Styles
   ========================================================================== */

.onedfcci-church-register {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.registration-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #e9ecef;
}

.registration-header h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 32px;
    font-weight: 700;
}

.registration-header p {
    margin: 0;
    color: #7f8c8d;
    font-size: 18px;
}

/* Messages */
.messages-container {
    margin-bottom: 25px;
}

.onedfcci-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.onedfcci-message.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #d63638;
    border-left: 4px solid #28a745;
}

.onedfcci-message.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #d63638;
    border-left: 4px solid #dc3545;
}

.onedfcci-message.warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #d63638;
    border-left: 4px solid #ffc107;
}

/* Form Sections */
.form-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-title {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.section-description {
    margin: 0 0 25px 0;
    color: #7f8c8d;
    font-size: 16px;
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.form-group label.required::after {
    content: ' *';
    color: #e74c3c;
    font-weight: 700;
}

/* Scope form-control styles to church finder components only */
.onedfcci-church-finder .form-control,
.onedfcci-church-finder-direct .form-control,
.onedfcci-registration .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: white;
}

.onedfcci-church-finder .form-control:focus,
.onedfcci-church-finder-direct .form-control:focus,
.onedfcci-registration .form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.onedfcci-church-finder .form-control:disabled,
.onedfcci-church-finder-direct .form-control:disabled,
.onedfcci-registration .form-control:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    display: block;
    margin-top: 8px;
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.4;
}

/* Image Preview */
.image-preview {
    margin-top: 15px;
}

.image-preview img {
    max-width: 250px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Repeater Fields */
.repeater-container {
    margin-bottom: 25px;
}

.repeater-item {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.repeater-item:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
}

.repeater-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.repeater-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.remove-item {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.remove-item:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.submit-section {
    text-align: center;
    border-top: 3px solid #e9ecef;
    padding-top: 30px;
}

.submit-btn {
    min-width: 250px;
    padding: 16px 40px;
    font-size: 18px;
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-indicator {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
    color: #7f8c8d;
    font-weight: 500;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .church-item {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .church-info h3 {
        font-size: 24px;
    }
    
    .map-iframe {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .onedfcci-church-finder,
    .onedfcci-church-register {
        padding: 15px;
    }
    
    .onedfcci-church-finder-direct {
        padding: 20px 16px;
        margin: 10px;
    }
    
    .onedfcci-church-finder-direct .search-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: stretch;
    }
    
    .onedfcci-church-finder-direct .form-select {
        width: 100%;
        min-height: 56px;
        padding: 16px 18px;
        padding-right: 50px;
        font-size: 16px;
    }
    
    .onedfcci-church-finder-direct .search-button {
        width: 100%;
        max-width: none;
        min-height: 56px;
        margin-top: 10px;
    }
    
    .onedfcci-church-finder-direct .search-button-field {
        grid-column: auto;
        justify-self: auto;
    }
    
    .finder-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .onedfcci-search-form {
        padding: 20px;
    }
    
    .church-item {
        padding: 20px;
    }
    
    .church-info h3 {
        font-size: 22px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .registration-header h2 {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pagination-container {
        gap: 10px;
    }
    
    .pagination-info {
        margin: 10px 0;
        text-align: center;
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    .onedfcci-church-finder,
    .onedfcci-church-register {
        padding: 10px;
    }
    
    .onedfcci-church-finder-direct {
        padding: 16px 12px;
        margin: 8px;
    }
    
    .onedfcci-church-finder-direct .search-grid {
        gap: 18px;
        align-items: stretch;
    }
    
    .onedfcci-church-finder-direct .form-select {
        width: 100%;
        padding: 16px 18px;
        padding-right: 50px;
        min-height: 58px;
        font-size: 16px;
    }
    
    .onedfcci-church-finder-direct .search-button {
        width: 100%;
        padding: 16px 20px;
        min-height: 58px;
        font-size: 16px;
        margin-top: 8px;
    }
    
    .onedfcci-search-form,
    .form-section {
        padding: 15px;
    }
    
    .church-item {
        padding: 15px;
    }
    
    .church-info h3 {
        font-size: 20px;
    }
    
    .registration-header h2 {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .repeater-item {
        padding: 15px;
    }
    
    .repeater-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .submit-btn {
        min-width: auto;
        width: 100%;
    }
    
    .loading-indicator {
        margin-left: 0;
        margin-top: 15px;
        justify-content: center;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .onedfcci-church-finder *,
    .onedfcci-church-finder *::before,
    .onedfcci-church-finder *::after,
    .onedfcci-church-finder-direct *,
    .onedfcci-church-finder-direct *::before,
    .onedfcci-church-finder-direct *::after,
    .onedfcci-church-register *,
    .onedfcci-church-register *::before,
    .onedfcci-church-register *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.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 better accessibility */
.form-control:focus,
.btn:focus,
.pagination-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .church-item {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* ==========================================================================
   Church Finder Direct Styles (Specific to Direct Finder)
   ========================================================================== */

.onedfcci-church-finder-direct {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8ecef;
}

.onedfcci-church-finder-direct .search-container {
    margin-bottom: 30px;
}

.onedfcci-church-finder-direct .search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 200px;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .onedfcci-church-finder-direct .search-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: stretch;
    }
    
    .onedfcci-church-finder-direct .form-select {
        width: 100%;
        min-height: 54px;
        padding: 15px 18px;
        padding-right: 48px;
    }
    
    .onedfcci-church-finder-direct .search-button-field {
        grid-column: auto;
        justify-self: auto;
        margin-top: 10px;
    }
    
    .onedfcci-church-finder-direct .search-button {
        width: 100%;
        max-width: none;
        min-height: 54px;
    }
}

.onedfcci-church-finder-direct .search-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

.onedfcci-church-finder-direct .search-field label {
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a202c;
    font-size: 15px;
    letter-spacing: 0.025em;
}

.onedfcci-church-finder-direct .form-select {
    padding: 14px 18px;
    padding-right: 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background-color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%234a5568"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    min-height: 52px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.onedfcci-church-finder-direct .form-select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15), 0 4px 6px rgba(0, 0, 0, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.onedfcci-church-finder-direct .form-select:hover:not(:disabled) {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.onedfcci-church-finder-direct .form-select:disabled {
    background-color: #f7fafc;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23a0aec0"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/></svg>');
    color: #a0aec0;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #e2e8f0;
}

.onedfcci-church-finder-direct .search-button-field {
    display: flex;
    align-items: flex-end;
}

.onedfcci-church-finder-direct .search-button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: white !important;
    border: none !important;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    min-width: 140px;
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.3);
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.onedfcci-church-finder-direct .search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.onedfcci-church-finder-direct .search-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.onedfcci-church-finder-direct .search-button:hover:not(:disabled)::before {
    left: 100%;
}

.onedfcci-church-finder-direct .search-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.3);
}

.onedfcci-church-finder-direct .search-button:disabled {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0.6;
}

.onedfcci-church-finder-direct .button-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Ensure no conflicts with mobile menu CSS */
.onedfcci-church-finder *,
.onedfcci-church-finder-direct * {
    box-sizing: border-box;
}

/* Prevent conflicts with navigation menus and mobile menu backgrounds */
.onedfcci-church-finder .form-select,
.onedfcci-church-finder .search-btn,
.onedfcci-church-finder-direct .form-select,
.onedfcci-church-finder-direct .search-button {
    z-index: 1;
    position: relative;
}

/* Ensure church finder components are properly isolated */
.onedfcci-church-finder,
.onedfcci-church-finder-direct {
    /* Create a new stacking context to prevent interference */
    isolation: isolate;
}

/* Loading and results states for direct finder */
.onedfcci-church-finder-direct #onedfcci-direct-loading,
.onedfcci-church-finder-direct #onedfcci-direct-results,
.onedfcci-church-finder-direct #onedfcci-direct-no-results {
    margin-top: 20px;
}

.onedfcci-church-finder-direct .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.onedfcci-church-finder-direct .loading-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.onedfcci-church-finder-direct .no-results {
    text-align: center;
    padding: 40px 20px;
}

.onedfcci-church-finder-direct .no-results-icon {
    margin-bottom: 20px;
    color: #bdc3c7;
}

.onedfcci-church-finder-direct .no-results h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.onedfcci-church-finder-direct .no-results p {
    color: #7f8c8d;
    margin: 0;
}