/* Styles for [doctors_search_enhanced] shortcode */

/* Moved from includes/class-railway-doctors-list.php line 1162-1452 */

.enhanced-doctors-search {
    max-width: 1200px;
    margin: 2em auto;
    padding: 1em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.search-header {
    text-align: center;
    margin-bottom: 2.5em;
    padding: 1.5em 0;
}

.search-header h2 {
    font-size: 2.25em;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5em 0;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-description {
    font-size: 1.1em;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

/* **[HIGHLIGHT-ADDED]** UX + Accessibility: make the form a real grid (the file already sets grid-template-columns in media queries). */
.enhanced-search-form {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.5em;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2em !important;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.enhanced-search-form:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12), 0 2px 5px rgba(0, 0, 0, 0.08);
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.search-field label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: #2c3e50;
    font-size: 0.95em;
    margin-bottom: 0.5em;
    letter-spacing: 0.01em;
}

.field-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.enhanced-select,
#enhanced-city-search {
    padding: 0.875em 1em;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1em;
    background: #ffffff;
    color: #2c3e50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.enhanced-select:hover,
#enhanced-city-search:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.enhanced-select:focus,
#enhanced-city-search:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1), 0 2px 8px rgba(0, 123, 255, 0.2);
    transform: translateY(-1px);
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    align-items: center;
}

.star-rating {
    display: inline-flex;
    gap: 0.25em;
}

.star {
    cursor: pointer;
    font-size: 1.75em;
    color: #e0e0e0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.star:hover {
    transform: scale(1.15);
    color: #ffd700;
}

.star.active,
.star[aria-checked="true"] {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.star-rating {
    padding: 0.5em;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 8px;
    display: inline-flex;
    gap: 0.25em;
}

.search-submit {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1em 2em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.search-submit::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 ease;
}

.search-submit:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

.search-submit:hover::before {
    left: 100%;
}

.search-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.button-icon {
    font-size: 1.1em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.enhanced-loading-spinner {
    text-align: center;
    padding: 3em 2em;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    margin: 2em 0;
}

.spinner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.spinner {
    border: 4px solid rgba(0, 123, 255, 0.1);
    border-top: 4px solid #007bff;
    border-right: 4px solid #007bff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.spinner-content p {
    color: #6c757d;
    font-size: 1em;
    margin: 0;
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Toggle Switch Styles */
.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    background-color: #cbd5e0;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(0, 123, 255, 0.2);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.toggle-label {
    padding: 0.5em;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.toggle-label:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhanced-search-form {
        grid-template-columns: 1fr;
    }

    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Add these styles to your existing CSS */
.enhanced-city-select-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.enhanced-city-select-wrapper select {
    width: 100%;
    max-width: 100%;
    min-height: 100px;
    margin: 0;
}

.enhanced-city-select-wrapper .select2-container {
    width: 100% !important;
}

.enhanced-city-select-wrapper .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #ddd !important;
}

.enhanced-city-select-wrapper .select2-selection__choice {
    background-color: #007bff !important;
    color: white !important;
    border: none !important;
    padding: 2px 8px !important;
    margin: 2px !important;
    border-radius: 3px !important;
}

.enhanced-city-select-wrapper .select2-selection__choice__remove {
    color: white !important;
    margin-right: 5px !important;
}

/* **HIGHLIGHTED** - Enhanced Select2 Open State Styling to match parent wrapper */
.enhanced-city-select-wrapper .select2-container--default.select2-container--open {
    width: 100% !important;
}

.enhanced-city-select-wrapper .select2-container--default.select2-container--open .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #ddd !important;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.enhanced-city-select-wrapper .select2-container--default.select2-container--open .select2-dropdown {
    border-top: none;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    border-bottom: 1px solid #ddd !important;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    width: 100% !important;
    box-sizing: border-box;
}

/* **HIGHLIGHTED** - Center the dropdown results within the container */
.enhanced-city-select-wrapper .select2-container--default.select2-container--open .select2-results {
    text-align: center !important;
    direction: ltr !important; /* Force LTR to ensure consistent centering */
}

.enhanced-city-select-wrapper .select2-container--default.select2-container--open .select2-results__options {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
}

.enhanced-city-select-wrapper .select2-container--default.select2-container--open .select2-results__option {
    width: auto !important; /* Change from 100% to auto to allow natural width */
    text-align: center !important;
    padding: 8px 16px !important;
    margin: 0 auto !important;
    display: block !important;
}

/* Share Buttons Styles */
.share-buttons {
    margin-top: 2em;
    text-align: center;
    padding: 1em;
    background: #f8f9fa;
    border-radius: 10px;
}

.share-buttons h3 {
    margin-bottom: 1em;
    color: #333;
}

.share-buttons-container {
    display: flex;
    justify-content: center;
    gap: 1em;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.875em 1.75em;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.share-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: white;
}

.share-button:hover::before {
    width: 300px;
    height: 300px;
}

.share-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.whatsapp-share {
    background-color: #25D366;
}

.facebook-share {
    background-color: #1877F2;
}

.share-icon {
    font-size: 1.2em;
}

/* Add these new styles */
.cache-notice {
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    background-color: #e8f4ff;
    border-radius: 5px;
    color: #0056b3;
    font-size: 0.9em;
}

.cache-notice .cache-icon {
    margin-right: 5px;
}

/* **[HIGHLIGHT-ADDED]** Admin Button Styles */
.admin-actions {
    margin-top: 2em;
    padding: 1em;
    background: #f8f9fa;
    border-radius: 5px;
}

.admin-button {
    background: #007cba;
    color: white;
    padding: 0.5em 1em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1em;
    transition: background-color 0.3s;
}

.admin-button:hover {
    background: #005a87;
}

.button-icon {
    font-size: 1.2em;
}

/* ===================================================================
   ENHANCED DOCTORS SEARCH - MOVED FROM PHP INLINE STYLES
   Refactored from includes/class-railway-doctors-list.php
   Date: October 6, 2025
   =================================================================== */

/* **FIX** - Enhanced doctors search width */
.enhanced-doctors-search {
    max-width: 100% !important;
    width: 100% !important;
    margin: 1em 0 !important;
    padding: 0 !important;
}

.search-form-container {
    width: 100%;
    max-width: 100%;
}

.enhanced-search-form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    gap: 1.5em;
}

/* Better grid layout for larger screens */
@media (min-width: 769px) {
    .enhanced-search-form {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .search-field.symptoms-field,
    .search-field.specialty-field,
    .search-field.city-field {
        grid-column: 1 / -1; /* Full width for symptoms, specialty, and city */
    }

    .search-filters {
        grid-column: 1 / -1; /* Full width for filters */
    }

    .search-submit {
        grid-column: 1 / -1; /* Full width for submit button */
    }
}

/* Ensure all search fields take full width */
.search-field {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* **FIX** - Ensure dropdowns aren't clipped */
.search-field.city-field {
    overflow: visible !important;
    position: relative;
    z-index: 50; /* Lower than other fields to prevent overlap */
}

/* Ensure specialty field is above city field */
.search-field.specialty-field {
    position: relative;
    z-index: 60;
}

.search-form-container,
.enhanced-search-form {
    overflow: visible !important;
}

.search-field select,
.search-field input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Symptoms field styling */
.symptoms-field {
    position: relative;
    margin-bottom: 20px;
}

.symptoms-autocomplete {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    direction: rtl;
    text-align: right;
    font-family: 'Arial', sans-serif;
    transition: border-color 0.3s ease;
}

.symptoms-autocomplete:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Suggestions container */
.symptoms-suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    direction: rtl;
    text-align: right;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.symptom-text {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.specialty-count {
    color: #666;
    font-size: 12px;
}

.searching-message, .no-suggestions, .error-message {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
    direction: rtl;
}

.error-message {
    color: #d63384;
}

/* Selected symptoms styling */
.selected-symptoms-container {
    margin-top: 10px;
    direction: rtl;
}

.selected-symptom {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 6px 12px;
    margin: 4px;
    border-radius: 20px;
    font-size: 13px;
    position: relative;
    direction: rtl;
    text-align: right;
}

.symptom-text {
    display: inline-block;
    margin-left: 8px;
}

.symptom-specialty {
    display: inline-block;
    font-size: 12px;
    opacity: 0.9;
    font-weight: 500;
    margin-left: 8px;
}

.remove-symptom {
    background: none;
    border: none;
    color: white;
    margin-left: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 0;
    line-height: 1;
}

.remove-symptom:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .symptoms-autocomplete {
        font-size: 14px;
        padding: 10px;
    }
    
    .suggestion-item {
        padding: 10px 12px;
    }
    
    .selected-symptom {
        font-size: 12px;
        padding: 4px 10px;
    }

    .symptom-text {
        font-size: 11px;
        margin-left: 6px;
    }

    .symptom-specialty {
        font-size: 10px;
        margin-left: 6px;
    }
}

/* Arabic text support */
.symptoms-field label,
.symptoms-autocomplete,
.suggestion-item,
.selected-symptom {
    font-family: 'Tahoma', 'Arial', sans-serif;
}

/* Field icon styling for symptoms field */
.symptoms-field .field-icon {
    margin-left: 8px;
    font-size: 18px;
}

/* Enhanced form field styling consistency */
.search-field.symptoms-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    direction: rtl;
    text-align: right;
}

/* **NEW:** Specialty auto-selection message styling */
.specialty-auto-selection-message {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    direction: rtl;
    text-align: right;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.specialty-auto-selection-message .message-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.specialty-auto-selection-message .message-text {
    flex: 1;
    font-size: 14px;
    color: #0066cc;
}

.specialty-auto-selection-message .other-specialties {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.specialty-auto-selection-message .close-message {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.specialty-auto-selection-message .close-message:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Responsive design for auto-selection message */
@media (max-width: 768px) {
    .specialty-auto-selection-message {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .specialty-auto-selection-message .message-text {
        font-size: 13px;
    }
    
    .specialty-auto-selection-message .other-specialties {
        font-size: 11px;
    }
}

/* **ENHANCED** - City Dropdown Styling */
.label-arabic {
    font-family: 'Noto Kufi Arabic', Arial, sans-serif;
    font-size: 0.95em;
    color: #666;
}

.city-selection-info {
    margin-top: 8px;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 3px;
    font-size: 13px;
    color: #666;
    text-align: center;
    border: 1px solid #ddd;
    position: relative;
    z-index: auto; /* Don't create stacking context */
}

#selected-cities-count {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

/* **SIMPLIFIED** - Choices.js styling for cities */
.enhanced-city-select-wrapper {
    width: 100%;
    max-width: 100%;
}

.enhanced-city-select-wrapper .choices__inner {
    min-height: 44px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    width: 100%;
    max-width: 100%;
}

.enhanced-city-select-wrapper .choices__inner:hover {
    border-color: #999;
}

.enhanced-city-select-wrapper .choices[data-type*="select-multiple"] .choices__button {
    background-color: #666;
    border-left: 1px solid rgba(255,255,255,0.3);
    padding: 0 8px;
}

.enhanced-city-select-wrapper .choices[data-type*="select-multiple"] .choices__button:hover {
    background-color: #333;
}

.enhanced-city-select-wrapper .choices__item {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 3px;
    font-size: 14px;
}

/* **FIX** - Dropdown positioning and visibility */
.enhanced-city-select-wrapper {
    position: relative;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.enhanced-city-select-wrapper .choices__list--dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    margin-top: 2px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    background: white !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.enhanced-city-select-wrapper .choices__list--dropdown.is-active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.enhanced-city-select-wrapper .choices[data-type*="select-multiple"][aria-expanded="true"] .choices__list--dropdown {
    display: block !important;
}

.enhanced-city-select-wrapper .choices__list--dropdown .choices__item--selectable {
    padding: 10px 12px;
    background: white;
    color: #333;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.enhanced-city-select-wrapper .choices__list--dropdown .choices__item--selectable:hover {
    background: #f5f5f5;
}

.enhanced-city-select-wrapper .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: #e8e8e8;
    color: #333;
}

.enhanced-city-select-wrapper .popular-badge {
    display: inline-block;
    margin-right: 4px;
    font-size: 13px;
    opacity: 0.7;
}

.enhanced-city-select-wrapper .choices__input {
    font-family: Arial, 'Noto Kufi Arabic', sans-serif;
    padding: 6px;
    font-size: 14px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .enhanced-city-select-wrapper .choices__list--dropdown .choices__item--selectable {
        padding: 14px 12px;
        font-size: 15px;
    }
}

/* ===================================================================
   **[HIGHLIGHT-ADDED]** UX + ACCESSIBILITY + PERFORMANCE TWEAKS
   - Visible focus styles for keyboard users
   - SR-only helper text
   - Button-style stars (no default button chrome)
   - Respect reduced-motion preferences
   =================================================================== */

/* Screen-reader only utility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Strong, consistent focus */
.enhanced-doctors-search :focus-visible {
    outline: 3px solid rgba(0, 124, 186, 0.55);
    outline-offset: 2px;
}

/* Star rating buttons */
.star-rating .star {
    background: transparent;
    border: 0;
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

.star-rating .star:focus-visible {
    outline: 3px solid rgba(0, 124, 186, 0.55);
    outline-offset: 4px;
    border-radius: 6px;
}

/* City select: ensure it isn't forced tall (legacy multi-select rule) */
.enhanced-city-select-wrapper select {
    min-height: auto;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================================================
   **[HIGHLIGHT-ADDED]** ENHANCED RESULTS & CARDS STYLING
   Modern, polished design for doctor cards and results
   =================================================================== */

.doctors-results {
    margin-top: 2.5em;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* **[HIGHLIGHT-ADDED]** Ensure doctor details are visible for ALL doctor cards, not just best-rated */
.doctor-card .doctor-details,
.doctor-card:not(.best-rated-doctor) .doctor-details,
.doctor-card.best-rated-doctor .doctor-details {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 1em;
    padding: 1em;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.doctor-card .doctor-info,
.doctor-card:not(.best-rated-doctor) .doctor-info,
.doctor-card.best-rated-doctor .doctor-info {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0.5em 0;
    padding: 0.5em 0;
    color: #2c3e50;
    font-size: 0.95em;
    line-height: 1.6;
    border-bottom: 1px solid #e9ecef;
}

.doctor-card .doctor-info:last-child,
.doctor-card:not(.best-rated-doctor) .doctor-info:last-child {
    border-bottom: none;
}

.doctor-card .doctor-info strong,
.doctor-card:not(.best-rated-doctor) .doctor-info strong {
    color: #495057;
    font-weight: 600;
    margin-right: 0.5em;
}

.no-results-message {
    text-align: center;
    padding: 3em 2em;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    margin: 2em 0;
    border: 2px dashed #dee2e6;
    color: #6c757d;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Enhanced pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
    margin: 2.5em 0;
    flex-wrap: wrap;
}

.pagination .page-link {
    padding: 0.75em 1em;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: #ffffff;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 44px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.pagination .page-link[aria-current="page"] {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    font-weight: 700;
}

.pagination .page-link.previous,
.pagination .page-link.next {
    font-weight: 600;
    padding: 0.75em 1.25em;
}

h1.entry-title.main_title {
    display: none!important;
}

/* Additional responsive enhancements */
@media (max-width: 768px) {
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 1em;
        margin: 0 auto;
        padding-top: 5px!important;
    }
    
    .search-header h2 {
        font-size: 1.75em;
    }
    
    .search-description {
        font-size: 1em;
    }
    
    .enhanced-search-form {
        padding: 1.5em !important;
    }
    
    .search-submit {
        padding: 0.875em 1.5em;
        font-size: 1em;
    }
    
    .pagination {
        gap: 0.375em;
    }
    
    .pagination .page-link {
        padding: 0.625em 0.875em;
        font-size: 0.9em;
        min-width: 40px;
    }
}

/* Print styles */
@media print {
    .enhanced-search-form,
    .search-submit,
    .pagination,
    .share-buttons {
        display: none;
    }
    
    .doctors-results {
        margin-top: 0;
    }
}