/*
!**
 * Accessibility Enhancements for Escort Directory
 * This file provides accessibility improvements for the entire site
 * to ensure compliance with WCAG 2.1 AA standards
 * WITHOUT changing any color schemes
 *!

!* Skip link styling - Make sure the skip link becomes visible when focused *!
.visually-hidden-focusable:focus {
    position: absolute !important;
    width: auto !important;
    height: auto !important;
    padding: 0.5rem 1rem !important;
    margin: 0.25rem !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: nowrap !important;
    border: 0;
    z-index: 1050;
    text-decoration: none;
}

!* Focus improvements - using existing color scheme *!
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid rgba(0, 0, 0, 0.2) !important; !* Neutral focus outline *!
    outline-offset: 2px;
}

!* Badge accessibility improvements - without color changes *!
.badge {
    font-size: 0.85em;
    font-weight: 500;
}

!* Featured badge - ensuring consistency based on memory reference
   using gold/yellow with improved contrast *!
.badge.text-bg-danger {
    background-color: #dc3545 !important; !* Bootstrap danger color with sufficient contrast *!
    color: #FFFFFF !important; !* Ensure white text for contrast *!
}

.badge.text-bg-danger i.fi-star,
.badge.text-bg-danger i.fi-shield {
    display: inline-block;
    margin-left: 4px;
}

!* Form field accessibility - without changing colors *!
input::placeholder,
textarea::placeholder {
    opacity: 0.8;
}

!* Properly hide elements but keep them accessible to screen readers *!
.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;
}

!* Ensure modals are accessible - no color changes *!
.modal[aria-modal="true"] {
    outline: none;
}

!* Improved focus for modal close buttons - using existing scheme *!
.modal .btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.25);
}

!* Modal close button visibility improvements for both light and dark modes *!
.modal .btn-close {
    opacity: 0.8; !* Increase default opacity *!
    filter: none; !* Remove any filters that might affect visibility *!
    width: 1.5em; !* Slightly larger *!
    height: 1.5em; !* Slightly larger *!
}

!* Dark mode specific adjustments for close button *!
.dark-mode .modal .btn-close,
[data-bs-theme="dark"] .modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); !* Make visible in dark mode *!
    opacity: 0.8;
}

!* Swiper accessibility enhancements - size only, no color changes *!
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    margin: 0 6px;
}

.swiper-button-next,
.swiper-button-prev {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

!* Ensure proper focus states on interactive elements inside cards *!
.card a:focus,
.card button:focus {
    z-index: 5;
    position: relative;
}

!* Add focus style for any focused button that might be dynamically added *!
[role="button"]:focus {
    outline: 3px solid rgba(0, 0, 0, 0.2) !important;
    outline-offset: 2px;
}

!* Dark mode focus improvements *!
.dark-mode a:focus,
.dark-mode button:focus,
.dark-mode input:focus,
.dark-mode select:focus,
.dark-mode textarea:focus,
.dark-mode [tabindex]:focus,
[data-bs-theme="dark"] a:focus,
[data-bs-theme="dark"] button:focus,
[data-bs-theme="dark"] input:focus,
[data-bs-theme="dark"] select:focus,
[data-bs-theme="dark"] textarea:focus,
[data-bs-theme="dark"] [tabindex]:focus {
    outline: 3px solid rgba(255, 255, 255, 0.2) !important; !* Light outline for dark mode *!
}

!* Ensure all interactive elements have pointer cursor *!
a[href],
button:not([disabled]),
input:not([disabled]),
select:not([disabled]),
textarea:not([disabled]),
[role="button"]:not([disabled]) {
    cursor: pointer;
}

!* Enhanced structure for icon buttons - no color changes *!
button.btn-icon:not([aria-label]) {
    position: relative;
}
button.btn-icon:not([aria-label])::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

!* Fix Select2 accessibility issues *!
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    min-height: 38px; !* Ensure sufficient touch target size *!
}

!* Fix the contrast of the placeholder text *!
.select2-container .select2-selection__placeholder {
    color: #666666 !important; !* Darker than default for better contrast *!
}

!* Ensure the focus state is visible *!
.select2-container .select2-selection--single:focus,
.select2-container .select2-selection--multiple:focus,
.select2-container--focus .select2-selection--single,
.select2-container--focus .select2-selection--multiple {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
    outline: 0 !important;
}

!* Fix the height of multiple selection container *!
.select2-container--bootstrap-5 .select2-selection--multiple {
    padding: 0.375rem 0.75rem;
}

!* Search field accessibility improvements *!
.select2-container .select2-search--inline .select2-search__field {
    margin-top: 0;
    padding: 0;
    color: #212529;
}

!* Fix the appearance of choices *!
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    color: #212529;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

!* Fix the remove button contrast *!
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #495057;
    background-color: transparent;
}

!* ARIA Accessibility fixes - NEW *!

!* Fix for invalid ARIA attributes on span elements *!
.select2-selection--accessible {
    !* Remove ARIA attributes that will be added via JS *!
    position: relative;
}

!* Improve contrast for buttons and interactive elements - using existing theme colors but with optimized shades *!
.btn-primary,
a.btn-primary,
button.btn-primary {
    !* Bootstrap danger color for better contrast *!
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.btn-outline-primary,
a.btn-outline-primary {
    border-color: #dc3545 !important;
    color: #dc3545 !important; !* Same color for better visual consistency *!
}

.btn-outline-primary:hover,
a.btn-outline-primary:hover {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

!* Footer text contrast improvement - maintain theme but improve contrast *!
footer.footer p.text-body-secondary,
footer.footer .text-body-secondary {
    color: #6c757d !important; !* Standard Bootstrap secondary color *!
}

footer.footer a {
    color: #dc3545 !important; !* Use red instead of blue for consistency *!
    text-decoration: underline;
}

!* Load more button contrast improvement *!
.load-more-text {
    color: #212529 !important; !* Ensure good contrast *!
}

!* Fix for ARIA landmark roles *!
!* Properly identify regions with appropriate ARIA roles *!
header[role="banner"] {
    display: block;
}

main[role="main"] {
    display: block;
}

footer[role="contentinfo"] {
    display: block;
}

!* Fix for ARIA select elements *!
.select2-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
}

!* Fix for incorrect role=searchbox *!
textarea.select2-search__field {
    !* searchbox isn't valid - search is the correct role *!
    height: auto !important;
    min-height: 28px;
}

!* Help with Select2 aria-* attribute problems by targeting the elements directly *!
.select2-container--bootstrap-5 .select2-selection--single {
    height: auto;
    min-height: 38px;
}

!* Improve form control contrast - maintain theme but improve contrast *!
.form-control::placeholder,
.form-select::placeholder {
    color: #6c757d !important; !* Bootstrap default gray *!
}

!* Body text contrast enhancement *!
body {
    color: #212529 !important;
}

!* General color contrast fixes - maintaining theme but improving contrast *!
.text-body-secondary {
    color: #6c757d !important; !* Standard Bootstrap secondary color *!
}

.text-muted {
    color: #6c757d !important; !* Maintaining Bootstrap theme *!
}

!* Fix for buttons with insufficient contrast *!
.btn-sm.btn-outline-primary {
    border-width: 2px;
    font-weight: 500;
}

!* Featured badge - adjusting to match the site's color theme better *!
.badge.text-bg-danger {
    background-color: #dc3545 !important; !* Bootstrap danger color *!
    color: #FFFFFF !important; !* Ensure white text for contrast *!
}

!* Fix for link colors in dark mode *!
[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] a.btn-outline-primary {
    border-color: #e25563 !important; !* Brighter red for dark mode *!
    color: #e25563 !important;
}

[data-bs-theme="dark"] footer.footer a {
    color: #e25563 !important; !* Brighter red for dark mode *!
}

!* Fix for link colors in alert messages *!
.alert-primary a {
    color: #b02a37 !important; !* Darker red for better contrast on alert background *!
    text-decoration: underline;
}

!* Improve focus visibility on interactive elements *!
:focus-visible {
    outline: 3px solid rgba(220, 53, 69, 0.5) !important;
    outline-offset: 2px;
}

!* Responsive profile card styles *!
.card .card-body .fs-lg.h3 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

!* General responsive improvements for all screen sizes *!
@media (max-width: 1199.98px) {
    .badge {
        font-size: 0.8em;
        padding: 0.3em 0.6em;
    }

    .card .card-body .fs-lg.h3 {
        font-size: 1.15rem !important;
    }
}

!* Tablet-specific improvements *!
@media (max-width: 991.98px) {
    .badge {
        font-size: 0.75em;
        padding: 0.25em 0.5em;
    }

    .card .card-body .fs-lg.h3 {
        font-size: 1.1rem !important;
    }

    .card-body {
        padding: 0.75rem !important;
    }
}

!* Mobile-specific accessibility improvements *!
@media (max-width: 767.98px) {
    !* Increase touch target sizes on mobile *!
    button,
    .btn,
    a.btn,
    input[type="button"],
    input[type="submit"],
    .nav-link,
    .page-link {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 0.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    !* Ensure badges are large enough to be readable on mobile but not too large *!
    .badge {
        font-size: 0.7em;
        padding: 0.2em 0.4em;
    }

    !* Make featured and verified badges smaller on mobile *!
    .d-flex.flex-column.gap-2.align-items-start .badge {
        font-size: 0.65em;
        padding: 0.15em 0.35em;
    }

    .badge i.fi-star,
    .badge i.fi-shield {
        font-size: 0.9em;
        margin-left: 2px !important;
    }

    !* Reduce profile name size on mobile *!
    .card .card-body .fs-lg.h3 {
        font-size: 1rem !important;
        line-height: 1.3;
        margin-bottom: 0.25rem !important;
    }

    !* Increase spacing between clickable elements *!
    .card-body {
        padding: 0.625rem !important;
    }

    !* Make Select2 more touch-friendly *!
    .select2-container .select2-selection--single,
    .select2-container .select2-selection--multiple {
        min-height: 44px;
    }

    .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
        margin-top: 0.35rem;
        margin-right: 0.35rem;
        padding: 0.25rem 0.5rem;
    }

    !* Improve mobile form controls *!
    input,
    select,
    textarea {
        font-size: 16px !important; !* Prevent iOS zoom on focus *!
    }

    !* Make sure mobile dropdowns are properly sized *!
    .dropdown-menu {
        min-width: 200px;
    }

    !* Ensure filter buttons have enough space *!
    #filters-container .btn {
        margin-bottom: 0.5rem;
    }

    !* Improve visibility of footer links on mobile *!
    footer.footer a {
        padding: 0.5rem 0;
        display: inline-block;
    }

    !* More compact card layout on mobile *!
    .col {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
}

!* Extra small devices *!
@media (max-width: 575.98px) {
    !* Further reduce badge size *!
    .badge {
        font-size: 0.65em;
        padding: 0.15em 0.35em;
    }

    !* Even smaller badges for profile cards *!
    .d-flex.flex-column.gap-2.align-items-start .badge {
        font-size: 0.6em;
        padding: 0.1em 0.3em;
    }

    !* Smaller profile title *!
    .card .card-body .fs-lg.h3 {
        font-size: 0.9rem !important;
    }

    !* Very compact card layout *!
    .card-body {
        padding: 0.5rem !important;
    }

    !* Reduce the gap between badges *!
    .d-flex.flex-column.gap-2.align-items-start {
        gap: 0.5rem !important;
    }

    !* Adjust badge positioning *!
    .d-flex.flex-column.gap-2.align-items-start.position-absolute.top-0.start-0 {
        margin-top: 0.5rem !important;
        margin-left: 0.5rem !important;
    }

    !* Adjust favorite button position *!
    .btn-favorite.position-absolute.top-0.end-0 {
        margin: 0.5rem !important;
    }
}

!* Fix for iPhone notch issues *!
@supports (padding: max(0px)) {
    .fixed-top,
    .sticky-top {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }

    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        !* Add padding to the bottom for iPhone X and newer with no home button *!
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
}

!* Mobile responsiveness for profile badges and titles - added for better mobile experience *!
@media (max-width: 991.98px) {
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.65em;
    }

    .profile-title {
        font-size: 1.15rem !important;
    }

    .card {
        padding: 0.5rem !important;
    }
}

@media (max-width: 767.98px) {
    .badge {
        font-size: 0.7rem;
        padding: 0.3em 0.5em;
    }

    .badge i {
        font-size: 0.8em;
    }

    .profile-title {
        font-size: 1rem !important;
    }

    .btn-favorite {
        width: 2rem !important;
        height: 2rem !important;
    }
}

@media (max-width: 575.98px) {
    .badge {
        font-size: 0.65rem;
        padding: 0.25em 0.5em;
        margin-bottom: 0.25rem;
    }

    .badge i {
        font-size: 0.75em;
    }

    .profile-title {
        font-size: 0.95rem !important;
    }
}

!*
 * Button color fix - High specificity override
 * This targets primary buttons with !important directives to override
 * any theme CSS that might be causing the red hover state
 *!

!* Fix for browser deprecation warning about h1 tags in sectioning elements *!
article h1,
aside h1,
nav h1,
section h1 {
    font-size: 2rem; !* Explicit font size for h1 in sectioning elements *!
}

!* Ensure consistency across different viewport sizes *!
@media (max-width: 991.98px) {
    article h1,
    aside h1,
    nav h1,
    section h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    article h1,
    aside h1,
    nav h1,
    section h1 {
        font-size: 1.5rem;
    }
}

!* Ensure h1 elements maintain their semantic importance with proper styling *!
h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
}

!* Fix contrast for text in footer with bg-primary-subtle background *!
footer.bg-primary-subtle {
    !* Ensure the background provides enough contrast *!
    background-color: #f5f0f1 !important; !* Slightly adjusted for better contrast with text *!
}

!* Improve footer copyright text contrast *!
footer .text-body-secondary {
    color: #4d4d4d !important; !* Darker than default secondary for better contrast *!
}

!* Fix Adult Creative link contrast *!
footer a.text-body {
    color: #ab1827 !important; !* Darker red for better contrast on light background *!
    font-weight: 500 !important;
    text-decoration: underline !important;
}

!* Fix hover state for links in footer *!
footer a.text-body:hover,
footer a.text-body:focus {
    color: #8a1420 !important; !* Even darker on hover/focus for better visibility *!
    text-decoration: underline !important;
}

!* Fix contrast for all footer links *!
footer .nav-link.text-body {
    color: #4d4d4d !important; !* Ensure footer nav links have proper contrast *!
}

!* Fix all footer text to ensure contrast *!
footer {
    color: #4d4d4d !important;
}

!* Ensure social media icons in footer have sufficient contrast *!
footer .btn-outline-secondary {
    color: #4d4d4d !important;
    border-color: #4d4d4d !important;
}

!* Fix contrast in dark mode *!
[data-bs-theme="dark"] footer.bg-primary-subtle {
    background-color: #2b2b2b !important;
}

[data-bs-theme="dark"] footer .text-body-secondary {
    color: #c2c2c2 !important;
}

[data-bs-theme="dark"] footer a.text-body {
    color: #e25563 !important; !* Brighter red for contrast in dark mode *!
}

[data-bs-theme="dark"] footer .nav-link.text-body {
    color: #c2c2c2 !important;
}

[data-bs-theme="dark"] footer {
    color: #c2c2c2 !important;
}

[data-bs-theme="dark"] footer .btn-outline-secondary {
    color: #c2c2c2 !important;
    border-color: #c2c2c2 !important;
}
*/
