/* IPDN Accessibility Toolbar */
#ipdn-accessibility.ipdn-a11y {
    --ipdn-a11y-color: #0879F9;
    position: fixed;
    top: 50%;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
    transform: translateY(-50%);
}

#ipdn-accessibility.ipdn-a11y-left {
    left: 16px;
}

#ipdn-accessibility.ipdn-a11y-right {
    right: 16px;
}

.ipdn-a11y-toggle {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--ipdn-a11y-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
    padding: 0;
    transition: transform .18s ease, box-shadow .18s ease;
}

.ipdn-a11y-toggle:hover,
.ipdn-a11y-toggle:focus-visible {
    transform: scale(1.06);
    box-shadow: 0 5px 18px rgba(0,0,0,.28);
    outline: 3px solid rgba(8,121,249,.28);
    outline-offset: 2px;
}

.ipdn-a11y-person svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ipdn-a11y-panel {
    position: absolute;
    top: 56px;
    width: 155px;
    padding: 9px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 18px rgba(0,0,0,.20);
    border: 1px solid rgba(0,0,0,.08);
}

.ipdn-a11y-left .ipdn-a11y-panel {
    left: 0;
}

.ipdn-a11y-right .ipdn-a11y-panel {
    right: 0;
}

.ipdn-a11y-panel[hidden] {
    display: none;
}

.ipdn-a11y-item {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 4px;
    background: #f3f3f3;
    color: #333;
    padding: 7px 8px;
    margin: 0 0 5px;
    font-size: 12px;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.ipdn-a11y-item:last-child {
    margin-bottom: 0;
}

.ipdn-a11y-item:hover,
.ipdn-a11y-item:focus-visible {
    background: #e6e6e6;
    outline: 2px solid var(--ipdn-a11y-color);
    outline-offset: 1px;
}

.ipdn-a11y-icon {
    width: 18px;
    min-width: 18px;
    text-align: center;
    color: #0879F9;
    font-weight: 700;
    font-size: 15px;
}

.ipdn-a11y-item[aria-pressed="true"] {
    background: #dceeff;
    box-shadow: inset 3px 0 0 var(--ipdn-a11y-color);
}

.ipdn-a11y-reset {
    margin-top: 2px;
}

/* User preferences
 * Text scaling is applied directly to text elements by accessibility.js.
 * This avoids relying on html/body font-size, which many themes and Elementor
 * widgets override with fixed px/rem values.
 */

html.ipdn-a11y-readable-font body,
html.ipdn-a11y-readable-font body *:not(#ipdn-accessibility):not(#ipdn-accessibility *) {
    font-family: Arial, Helvetica, sans-serif !important;
}

html.ipdn-a11y-highlight-links body a:not(#ipdn-accessibility a),
html.ipdn-a11y-highlight-links body a:not(#ipdn-accessibility a):visited {
    background: #fff36a !important;
    color: #111 !important;
    text-decoration: underline !important;
    outline: 2px solid #111 !important;
    outline-offset: 1px;
}

html.ipdn-a11y-contrast {
    background: #000 !important;
}

html.ipdn-a11y-contrast body,
html.ipdn-a11y-contrast main,
html.ipdn-a11y-contrast section,
html.ipdn-a11y-contrast article,
html.ipdn-a11y-contrast header,
html.ipdn-a11y-contrast footer,
html.ipdn-a11y-contrast nav {
    background: #000 !important;
    color: #fff !important;
}

html.ipdn-a11y-contrast body *:not(#ipdn-accessibility):not(#ipdn-accessibility *) {
    border-color: #fff !important;
}

html.ipdn-a11y-contrast body a:not(#ipdn-accessibility a) {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

html.ipdn-a11y-contrast body h1,
html.ipdn-a11y-contrast body h2,
html.ipdn-a11y-contrast body h3,
html.ipdn-a11y-contrast body h4,
html.ipdn-a11y-contrast body h5,
html.ipdn-a11y-contrast body h6,
html.ipdn-a11y-contrast body p,
html.ipdn-a11y-contrast body li,
html.ipdn-a11y-contrast body span,
html.ipdn-a11y-contrast body label {
    color: #fff !important;
}

html.ipdn-a11y-contrast img,
html.ipdn-a11y-contrast video,
html.ipdn-a11y-contrast iframe {
    filter: none !important;
}

/* Strong keyboard focus */
html.ipdn-a11y-keyboard *:focus-visible {
    outline: 3px solid #ffbf00 !important;
    outline-offset: 3px !important;
}

@media (max-width: 600px) {
    #ipdn-accessibility.ipdn-a11y-left {
        left: 10px;
    }

    #ipdn-accessibility.ipdn-a11y-right {
        right: 10px;
    }

    .ipdn-a11y-toggle {
        width: 44px;
        height: 44px;
    }

    .ipdn-a11y-panel {
        width: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ipdn-accessibility *,
    #ipdn-accessibility *::before,
    #ipdn-accessibility *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}


/* Hover-to-speech mode */
html.ipdn-a11y-hover-reading body h1,
html.ipdn-a11y-hover-reading body h2,
html.ipdn-a11y-hover-reading body h3,
html.ipdn-a11y-hover-reading body h4,
html.ipdn-a11y-hover-reading body h5,
html.ipdn-a11y-hover-reading body h6,
html.ipdn-a11y-hover-reading body p,
html.ipdn-a11y-hover-reading body li,
html.ipdn-a11y-hover-reading body a,
html.ipdn-a11y-hover-reading body button,
html.ipdn-a11y-hover-reading body label,
html.ipdn-a11y-hover-reading body blockquote,
html.ipdn-a11y-hover-reading body figcaption,
html.ipdn-a11y-hover-reading body td,
html.ipdn-a11y-hover-reading body th {
    cursor: help;
}

html.ipdn-a11y-hover-reading .ipdn-a11y-item[data-action="read"] {
    background: #0879F9;
    color: #fff;
}

html.ipdn-a11y-hover-reading .ipdn-a11y-item[data-action="read"] .ipdn-a11y-icon {
    color: #fff;
}

/* Speech activation feedback */
.ipdn-a11y-speech-notice {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1000000;
    max-width: min(420px, calc(100vw - 32px));
    padding: 10px 14px;
    border-radius: 8px;
    background: #222;
    color: #fff;
    font: 13px/1.45 Arial, Helvetica, sans-serif;
    box-shadow: 0 5px 18px rgba(0,0,0,.22);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: opacity .18s ease, transform .18s ease;
}

.ipdn-a11y-speech-notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .ipdn-a11y-speech-notice {
        transition: none;
    }
}
