/* ╔══════════════════════════════════════════════════════════════════════╗
   ║   E-A-A – „AccessMate”  (kompaktowy widżet dostępności)  © 2025       ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/*─────────────────────────────────────────────────────────────────────────
      VARIABLES                                                              */
:root {
    /* Kolory podstawowe */
    --besite-primary: #56C09F;
    --besite-primary-hover: #45a88a;
    --besite-secondary: #2196f3;
    --besite-secondary-hover: #1976d2;
    --besite-danger: #e53935;
    --besite-warning: #FFE800;
    --besite-dark: #232323;
    --besite-darker: #1B1B1B;
    --besite-dark-light: #292727;
    --besite-gray: #787676;
    --besite-light: #f9f8f5;
    --besite-lighter: #fff;
    --besite-text: #333;
    --besite-text-light: #f5f5f5;

    /* Efekty */
    --besite-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.12);
    --besite-shadow-hover: 0 0.375rem 1.25rem -0.3125rem rgba(0, 0, 0, 0.28);
    --besite-radius: 0.75rem;
    --besite-radius-sm: 0.625rem;
    --besite-transition: 0.15s ease;
}

/*─────────────────────────────────────────────────────────────────────────
      RESET (działa tylko wewnątrz widżetu)                                */
.eaa-widget *,
.eaa-widget *::before,
.eaa-widget *::after {
    box-sizing: border-box;
}

/*─────────────────────────────────────────────────────────────────────────
      MAIN WIDGET CONTAINER                                                */
.eaa-widget {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 9999;
    font-family: "Inter", Arial, sans-serif;
    color: var(--besite-text);
}

/*─────────────────────────────────────────────────────────────────────────
      FLOATING BUTTON                                                      */
.eaa-button {
    all: unset;
    width: 3.5rem;
    height: 3.5rem;
    display: grid !important;
    place-items: center;
    border-radius: 50%;
    background: var(--besite-text);
    color: var(--besite-lighter);
    cursor: pointer;
    box-shadow: var(--besite-shadow);
    transition: background var(--besite-transition);
    margin-bottom: 1rem;
    margin-left: 1rem;
}

.eaa-button:hover,
.eaa-button:focus-visible {
    background: var(--besite-dark);
}

.eaa-button .icon {
    font-size: 1.4rem;
    cursor: pointer;
}

.eaa-button:active .fa-universal-access {
    animation: spin 0.6s linear;
}

@keyframes spin {
    to {
        transform: rotate(1turn);
    }
}

/*─────────────────────────────────────────────────────────────────────────
      WIDGET MENU PANEL                                                    */
.eaa-menu {
    position: fixed;
    height: 100%;
    bottom: 0;
    left: 0;
    width: 25rem; /* 400px */
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--besite-light);
    color: var(--besite-text);
    padding: 1.25rem 1rem 1.5rem;
    border-top-right-radius: var(--besite-radius);
    border-bottom-right-radius: var(--besite-radius);
    box-shadow: var(--besite-shadow);
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
    direction: rtl;
}

.eaa-menu * {
    direction: ltr;
}

.eaa-menu.eaa-closed {
    display: none;
}

.eaa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9998;
    display: none;
}

.eaa-overlay.active {
    display: block;
}

/*─────────────────────────────────────────────────────────────────────────
      PRE-HEADER (close button + dark mode toggle)                         */
.eaa-preheader-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

#eaa-close {
    background-color: transparent;
    padding-left: 0;
    border: none;
}

#eaa-close:hover {
    color: var(--besite-dark);
}

/* Dark mode toggle */
.eaa-preheader-block label {
    position: relative;
    width: 4rem;
    height: 2rem;
    display: block;
    background: var(--besite-text);
    border-radius: 12.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

.eaa-preheader-block label::after {
    content: "";
    position: absolute;
    top: 0.3125rem;
    left: 0.375rem;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 11.25rem;
    background: var(--besite-lighter);
    box-shadow: 0 0.3125rem 0.625rem rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.eaa-preheader-block input {
    width: 0;
    height: 0;
    visibility: hidden;
}

.eaa-preheader-block input:checked + label {
    background: var(--besite-lighter);
}

.eaa-preheader-block input:checked + label::after {
    left: 3.625rem;
    transform: translateX(-100%);
    background: linear-gradient(180deg, #777, var(--besite-text));
}

.eaa-darkmode-icons .eaa-darkmode-icon-sun,
.eaa-darkmode-icons .eaa-darkmode-icon-moon {
    position: absolute;
    top: 0.375rem;
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    color: var(--besite-lighter);
    text-align: center;
}

.eaa-darkmode-icon-sun {
    left: 0.3125rem;
}

.eaa-darkmode-icon-moon {
    right: 0.5rem;
}

.eaa-preheader-block label:active::after {
    width: 3.3125rem;
}

/*─────────────────────────────────────────────────────────────────────────
      HEADER BLOCK                                                        */
.eaa-header-block {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
}

.eaa-header-block p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s;
}

/*─────────────────────────────────────────────────────────────────────────
      LANGUAGE SWITCHER                                                   */
.eaa-lang-switcher {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0;
}

.eaa-lang-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--besite-text);
}

#eaa-lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: var(--besite-radius-sm);
    font-size: 0.88rem;
    padding: 0 0.9375rem;
    height: 2.8125rem;
    min-height: 2.8125rem;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' viewBox='0 0 24 24' width='20' height='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 1rem;
    color: var(--besite-text);
    cursor: pointer;
    transition: border var(--besite-transition);
    border: none;
    min-width: 9.375rem;
}

#eaa-lang-select:hover {
    background-color: var(--besite-lighter) !important;
    color: #000 !important;
    box-shadow: var(--besite-shadow-hover);
}

/*─────────────────────────────────────────────────────────────────────────
      PROFILES (tiles)                                                    */
.eaa-profiles-header,
.eaa-option-header {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.eaa-profiles-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.eaa-profile button {
    all: unset;
    cursor: pointer;
    width: 7.8125rem;
    height: 6.25rem;
    max-height: 6.25rem;
    padding: 0.625rem 0;
    gap: 0.625rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--besite-lighter);
    color: var(--besite-text);
    border-radius: var(--besite-radius-sm);
    font-size: 0.85rem;
    transition: background 0.3s, color 0.3s;
}

.eaa-profile button:hover,
.eaa-profile button:focus-visible {
    background: var(--besite-secondary);
    color: var(--besite-lighter);
}

.eaa-profile .profile-icon {
    font-size: 1.6rem;
}

/*─────────────────────────────────────────────────────────────────────────
      OPTIONS (list)                                                      */
.eaa-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.eaa-option button {
    all: unset;
    cursor: pointer;
    width: 100%;
    max-width: -webkit-fill-available;
    height: 2.8125rem;
    min-height: 2.8125rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 0.9375rem;
    background: var(--besite-lighter);
    color: var(--besite-text);
    border-radius: var(--besite-radius-sm);
    font-size: 0.88rem;
    transition: background 0.3s, color 0.3s;
}

.eaa-option button:hover,
.eaa-option button:focus-visible {
    background-color: var(--besite-lighter) !important;
    color: #000 !important;
    box-shadow: var(--besite-shadow-hover);
}

.eaa-option button:hover .icon,
.eaa-option button:focus-visible .icon {
    color: #000;
}

.eaa-option .icon {
    font-size: 1rem;
}

.eaa-option .steps {
    margin-left: auto;
    display: flex;
    gap: 0.25rem;
    padding-right: 1.25rem;
}

.eaa-option .step {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: #666;
    opacity: 0;
    transition: opacity 0.2s;
    position: relative;
}

.selected-button {
    position: relative !important;
    box-shadow: var(--besite-shadow-hover) !important;
    color: var(--besite-primary) !important;
}

.selected-button:after {
    content: '✓';
    position: absolute;
    right: 0.625rem;
    top: 50%;
    font-size: 1.25rem;
    transform: translate(0, -50%);
    color: var(--besite-primary);
}

.selected-button .step {
    background: var(--besite-primary) !important;
}

.eaa-option button:hover .step,
.eaa-option button:focus .step {
    background: #000;
    opacity: 0.9;
}

/*─────────────────────────────────────────────────────────────────────────
      RESET BUTTON + FOOTER                                               */
#eaa-reset {
    all: unset;
    cursor: pointer;
    width: 100%;
    text-align: center;
    padding: 0.55rem 0;
    border-radius: var(--besite-radius);
    background: var(--besite-text);
    color: var(--besite-lighter);
    margin-top: 0.5rem;
    transition: background 0.3s;
}

#eaa-reset i {
    color: var(--besite-lighter) !important;
}

#eaa-reset:hover,
#eaa-reset:focus-visible {
    background: #000;
}

.eaa-footer {
    margin-top: 1rem;
    font-size: 0.8rem;
    text-align: center;
    color: var(--besite-text);
    opacity: 0.75;
}

.eaa-footer a {
    color: var(--besite-secondary);
    text-decoration: none;
}

.eaa-footer a:hover {
    text-decoration: underline;
}

.eaa-hide-widget {
    all: unset;
    cursor: pointer;
    color: var(--besite-secondary);
}

/*─────────────────────────────────────────────────────────────────────────
      DARK MODE STYLES                                                     */
html.darkmode {
    filter: invert(1) !important;
}

.eaa-menu.darkmode {
    --besite-light: #111;
    --besite-lighter: #1b1b1b;
    --besite-text: #f5f5f5;
    --besite-secondary: #0aaaff;
    --besite-secondary-hover: #0790d6;
    --besite-danger: #ff4d4d;
    --besite-shadow: 0 0.375rem 0.875rem rgba(0, 0, 0, 0.45);
}

.darkmode .eaa-option button .icon,
.darkmode .eaa-profile button .profile-icon,
.darkmode #eaa-close .icon,
.darkmode #eaa-reset .icon,
.darkmode .eaa-darkmode-icon-sun,
.darkmode .eaa-darkmode-icon-moon {
    color: var(--besite-gray);
}

.darkmode #eaa-close:hover i {
    color: var(--besite-lighter);
}

/*─────────────────────────────────────────────────────────────────────────
      ACCESSIBILITY EFFECTS (added by JS)                                  */
.contrast-low {
    filter: contrast(75%) !important;
}

.contrast-negative,
.contrast-negative * {
    background-color: var(--besite-dark-light) !important;
    color: var(--besite-lighter) !important;
    background: var(--besite-dark-light) !important;
}

.contrast-negative a,
.contrast-negative a span,
.contrast-negative a div,
.contrast-negative a * {
    color: var(--besite-warning) !important;
    text-decoration: underline;
}

.contrast-negative a:hover {
    opacity: 0.8;
}

.contrast-negative img,
.contrast-negative video,
.contrast-negative iframe,
.contrast-negative picture,
.contrast-negative svg {
    filter: none !important;
}

.contrast-negative .eaa-overlay.active {
    background: rgba(0, 0, 0, .5) !important;
}

.contrast-negative .eaa-option .steps {
    background: transparent !important;
}

.contrast-negative .eaa-option button:hover,
.contrast-negative .eaa-option button:hover i {
    color: #000 !important;
    background: transparent;
}

.contrast-negative .eaa-option .step {
    background: var(--besite-lighter) !important;
}

.contrast-negative .eaa-option:hover .step {
    background: #666 !important;
}

.contrast-negative .eaa-option .step * {
    background: var(--besite-lighter) !important;
}

.contrast-negative .selected-button .icon {
    color: var(--besite-lighter) !important;
}

.saturation-low {
    filter: saturate(50%) !important;
}

.saturation-high {
    filter: saturate(4) !important;
}

.greyscale {
    filter: grayscale(1) !important;
}

.animations-stopped * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
}

.hidden-image {
    opacity: 0 !important;
}

.shined-link {
    text-decoration: underline !important;
    color: var(--besite-warning) !important;
    font-weight: 700 !important;
}

.shined-header {
    color: #ff0400 !important;
    background: var(--besite-lighter) !important;
    font-weight: 700 !important;
}

.font-readable,
* .font-readable,
.font-dyslexic *:not(i) {
    font-family: Arial, sans-serif !important;
}

.font-dyslexic,
* .font-dyslexic,
.font-dyslexic *:not(i) {
    font-family: "Open-Dyslexic", sans-serif !important;
}

/*─────────────────────────────────────────────────────────────────────────
      CURSOR EFFECTS                                                       */
.cursor-line {
    position: fixed;
    left: 0;
    width: 100%;
    height: 0.125rem;
    background: var(--besite-warning);
    pointer-events: none;
    z-index: 99999;
}

.dark-area {
    position: fixed;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 99998;
}

.cursor-big {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' width='50px' height='50px'%3E%3Cpath d='M 29.699219 47 C 29.578125 47 29.457031 46.976563 29.339844 46.933594 C 29.089844 46.835938 28.890625 46.644531 28.78125 46.398438 L 22.945313 32.90625 L 15.683594 39.730469 C 15.394531 40.003906 14.96875 40.074219 14.601563 39.917969 C 14.238281 39.761719 14 39.398438 14 39 L 14 6 C 14 5.601563 14.234375 5.242188 14.601563 5.082031 C 14.964844 4.925781 15.390625 4.996094 15.683594 5.269531 L 39.683594 27.667969 C 39.972656 27.9375 40.074219 28.355469 39.945313 28.726563 C 39.816406 29.101563 39.480469 29.363281 39.085938 29.398438 L 28.902344 30.273438 L 35.007813 43.585938 C 35.117188 43.824219 35.128906 44.101563 35.035156 44.351563 C 34.941406 44.601563 34.757813 44.800781 34.515625 44.910156 L 30.113281 46.910156 C 29.980469 46.96875 29.84375 47 29.699219 47 Z'/%3E%3C/svg%3E") 16 16, auto;
}

/*─────────────────────────────────────────────────────────────────────────
      FONT AWESOME ICONS                                                   */
.eaa-button .icon,
#eaa-close .icon,
#eaa-reset .icon,
.eaa-option .icon,
.eaa-profile .profile-icon,
.eaa-darkmode-icon-sun,
.eaa-darkmode-icon-moon {
    background: none !important;
    background-image: none !important;
    width: auto;
    height: auto;
    line-height: 1;
    display: inline-block;
}

/* Icon sizes */
.eaa-button .icon {
    font-size: 1.9rem;
}

.eaa-option .icon {
    font-size: 1.05rem;
}

.eaa-profile .profile-icon {
    font-size: 1.7rem;
}

#eaa-close .icon {
    font-size: 1.25rem;
}

#eaa-reset .icon {
    font-size: 1rem;
}

.eaa-darkmode-icon-sun,
.eaa-darkmode-icon-moon {
    font-size: 1rem;
}

/*─────────────────────────────────────────────────────────────────────────
      MISC STYLES                                                         */
.d-none {
    display: none !important;
}

.dark-above {
    top: 0;
}

#eaa-button:hover i {
    color: var(--besite-lighter);
}

.eaa-menu p.small img {
    max-width: 4.375rem;
}

.eaa-menu p.small {
    font-size: 0.75rem;
    margin-bottom: 0;
}

.eaa-menu p.small a {
    text-decoration: none;
    color: var(--besite-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
}

/*─────────────────────────────────────────────────────────────────────────
      RESPONSIVE                                                          */
@media (max-width: 48.68625rem) { /* 778.98px */
    .eaa-menu {
        position: fixed;
        top: 0;
        width: calc(100% - 6.25rem);
    }
}

/*─────────────────────────────────────────────────────────────────────────
      FOCUS STYLES                                                        */
.eaa-widget button:focus-visible,
.eaa-widget [role="button"]:focus-visible {
    outline: 0.125rem solid var(--besite-secondary);
    outline-offset: 0.125rem;
}

.visually-hidden {
    position: absolute !important;
    width: 0.0625rem;
    height: 0.0625rem;
    margin: -0.0625rem;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.vsb-menu :not(.multi) li.active::before{
    content: none !important;
}

.vsb-menu :not(.multi) li.active{
    margin-left: 0px !important;
}