@import url("https://fonts.cdnfonts.com/css/open-dyslexic");


/* Isolated styles for accessibility widget */
.accessibility-widget-isolation {
    all: initial;
}
@media (max-width: 768px) {
  .accessibility-widget-isolation {
      display: none;
  }
}
.accessibility-widget-isolation * {
    all: unset;
    display: revert;
    box-sizing: border-box;
}
.accessibility-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e14d4d;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(225, 77, 77, 0.3);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    z-index: 999999;
}
.accessibility-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(225, 77, 77, 0.5);
}
.accessibility-icon {
    width: 24px;
    height: 24px;
    color: white;
    display: block;
}
.accessibility-icon circle,
.accessibility-icon path,
.accessibility-icon line {
    stroke: white;
    stroke-width: 2;
    fill: none;
}
.accessibility-toggle-btn .accessibility-icon-img {
    width: 40px;
    height: 40px;
    filter: brightness(0) saturate(100%) invert(1) sepia(0%) saturate(0%)
        hue-rotate(93deg) brightness(103%) contrast(103%);
    display: block;
    margin: auto;
}
.accessibility-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 999998;
    overflow: hidden;
    font-family:
        system-ui,
        -apple-system,
        sans-serif;
}
.panel-header {
    background: #e14d4d;
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}
.close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}
.close-btn svg {
    width: 16px;
    height: 16px;
    color: white;
    stroke: white;
    display: block;
}
.panel-content {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    background: white;
}
.control-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}
.control-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.control-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.button-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.control-btn:hover {
    background: #e5e7eb;
}
.size-indicator {
    min-width: 60px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}
.toggle-group {
    display: flex;
    gap: 10px;
}
.toggle-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.toggle-btn:hover {
    background: #e5e7eb;
}
.toggle-btn.active {
    background: #e14d4d;
    color: white;
    border-color: #e14d4d;
}
.feature-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.feature-btn {
    padding: 8px 12px;
    border-radius: 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.feature-btn:hover {
    background: #e5e7eb;
}
.feature-btn.active {
    background: #e14d4d;
    color: white;
    border-color: #e14d4d;
}
.reset-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: #e14d4d;
    color: white;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}
.reading-guide-line {
    position: fixed;
    left: 0;
    right: 0;
    height: 2px;
    background: #e14d4d;
    pointer-events: none;
    z-index: 999997;
    transition: top 0.1s ease;
}
.slide-fade-enter-active,
.slide-fade-leave-active {
    transition: all 0.3s ease;
}
.slide-fade-enter-from,
.slide-fade-leave-to {
    transform: translateY(20px);
    opacity: 0;
}
/* Effects */
.a11y-text-spacing
    *:not(.accessibility-widget-isolation):not(
        .accessibility-widget-isolation *
    ) {
    letter-spacing: var(--a11y-letter-spacing);
    word-spacing: var(--a11y-word-spacing);
    line-height: var(--a11y-line-height);
}
.a11y-dyslexia-font
    *:not(.accessibility-widget-isolation):not(
        .accessibility-widget-isolation *
    ) {
    font-family: "Open-Dyslexic", "Comic Sans MS", sans-serif;
}
.a11y-highlight-links a:not(.accessibility-widget-isolation a) {
    background-color: rgba(255, 255, 0, 0.3);
    text-decoration: underline;
    padding: 2px 4px;
}
.a11y-reduce-motion
    *:not(.accessibility-widget-isolation):not(
        .accessibility-widget-isolation *
    ),
.a11y-reduce-motion
    *:not(.accessibility-widget-isolation):not(
        .accessibility-widget-isolation *
    )::before,
.a11y-reduce-motion
    *:not(.accessibility-widget-isolation):not(
        .accessibility-widget-isolation *
    )::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
}
body.a11y-monochrome > *:not(.accessibility-widget-isolation) {
    filter: grayscale(100%);
}
.accessibility-widget-isolation,
.accessibility-widget-isolation * {
    letter-spacing: normal;
    word-spacing: normal;
    line-height: normal;
    cursor: default;
    opacity: 1;
    filter: none;
    animation-duration: inherit;
    transition-duration: inherit;
}
:root {
    --a11y-font-scale: 100%;
}
html.a11y-font-adjusted {
    font-size: var(--a11y-font-scale);
}
