
/* Avasta Accessibility Styles */
.avasta-accessibility-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.avasta-accessibility-toggle {
    background: #F4C842;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
}

.avasta-accessibility-toggle:hover {
    background: #E6B73A;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.avasta-accessibility-toggle:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Enhanced pulse animation for eye icon */
.avasta-accessibility-toggle::after {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid rgba(244, 200, 66, 0.5);
    animation: eye-pulse 2.5s infinite;
}

@keyframes eye-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Eye icon specific styling */
.avasta-accessibility-toggle svg {
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.15));
    transition: transform 0.2s ease;
}

.avasta-accessibility-toggle:hover svg {
    transform: scale(1.05);
}

.avasta-accessibility-content {
    position: absolute;
    left: 0;
    bottom: 65px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 320px;
    max-height: 500px;
    overflow-y: auto;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 2px solid #F4C842;
}

.avasta-accessibility-content.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.avasta-accessibility-header {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.avasta-accessibility-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.avasta-accessibility-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.avasta-accessibility-close:hover {
    background: #e5e5e5;
}

.avasta-accessibility-options {
    padding: 20px;
}

.avasta-accessibility-section {
    margin-bottom: 20px;
}

.avasta-accessibility-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.avasta-accessibility-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.avasta-font-info {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 4px;
}

.avasta-btn {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-weight: 500;
}

.avasta-btn:hover {
    background: #F4C842;
    border-color: #F4C842;
    color: #333;
}

.avasta-btn.active {
    background: #F4C842;
    border-color: #F4C842;
    color: #333;
}

.avasta-reset {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    width: 100%;
    padding: 10px;
    font-weight: 600;
}

.avasta-reset:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
}

/* Design Protection Rules */
body.avasta-font-adjusted {
    overflow-x: hidden !important;
}

body.avasta-font-adjusted * {
    word-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
}

body.avasta-font-adjusted .container,
body.avasta-font-adjusted .wrapper,
body.avasta-font-adjusted [class*="container"],
body.avasta-font-adjusted [class*="wrapper"] {
    min-height: auto !important;
    overflow: visible !important;
}

body.avasta-font-adjusted button,
body.avasta-font-adjusted input[type="button"],
body.avasta-font-adjusted input[type="submit"],
body.avasta-font-adjusted .btn {
    padding: 0.5em 1em !important;
    min-height: 2.5em !important;
    white-space: normal !important;
    line-height: 1.2 !important;
}

body.avasta-font-adjusted nav,
body.avasta-font-adjusted .nav,
body.avasta-font-adjusted .navigation,
body.avasta-font-adjusted .menu {
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
}

body.avasta-font-adjusted nav ul,
body.avasta-font-adjusted .nav ul,
body.avasta-font-adjusted .menu ul {
    flex-wrap: wrap !important;
    height: auto !important;
}

body.avasta-font-adjusted nav li,
body.avasta-font-adjusted .nav li,
body.avasta-font-adjusted .menu li {
    height: auto !important;
    min-height: auto !important;
    white-space: normal !important;
}

body.avasta-font-adjusted .card,
body.avasta-font-adjusted .box,
body.avasta-font-adjusted [class*="card"],
body.avasta-font-adjusted [class*="box"] {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
}

body.avasta-font-adjusted .grid,
body.avasta-font-adjusted .flex,
body.avasta-font-adjusted [class*="grid"],
body.avasta-font-adjusted [class*="flex"] {
    align-items: stretch !important;
    height: auto !important;
}

body.avasta-font-adjusted table {
    table-layout: auto !important;
    width: auto !important;
    max-width: 100% !important;
}

body.avasta-font-adjusted td,
body.avasta-font-adjusted th {
    height: auto !important;
    vertical-align: top !important;
    white-space: normal !important;
}

body.avasta-font-adjusted img,
body.avasta-font-adjusted video,
body.avasta-font-adjusted iframe {
    height: auto !important;
    max-width: 100% !important;
}

body.avasta-font-adjusted [style*="position: fixed"],
body.avasta-font-adjusted [style*="position:fixed"] {
    position: static !important;
}

body.avasta-font-adjusted .col,
body.avasta-font-adjusted [class*="col-"] {
    height: auto !important;
    min-height: auto !important;
}

body.avasta-font-adjusted * {
    max-font-size: 36px !important;
    line-height: 1.4 !important;
}

body.avasta-font-adjusted .badge,
body.avasta-font-adjusted .tag,
body.avasta-font-adjusted .label,
body.avasta-font-adjusted small,
body.avasta-font-adjusted .small {
    font-size: max(0.8em, 12px) !important;
    max-font-size: 18px !important;
}

body.avasta-font-adjusted h1 {
    max-font-size: 48px !important;
}

body.avasta-font-adjusted h2 {
    max-font-size: 36px !important;
}

body.avasta-font-adjusted h3 {
    max-font-size: 28px !important;
}

/* Accessibility Features */
body.avasta-high-contrast {
    filter: contrast(150%) !important;
}

body.avasta-dark-mode {
    background: #1a1a1a !important;
    color: #ffffff !important;
}

body.avasta-dark-mode *:not(.avasta-accessibility-panel *) {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #444 !important;
}

body.avasta-dark-mode img {
    opacity: 0.8;
}

/* Font style cycling */
body.avasta-font-style-1 * {
    font-family: "Georgia", "Times New Roman", serif !important;
}

body.avasta-font-style-2 * {
    font-family: "Verdana", "Geneva", sans-serif !important;
}

body.avasta-font-style-3 * {
    font-family: "Tahoma", "Geneva", sans-serif !important;
}

body.avasta-font-style-4 * {
    font-family: "Comic Sans MS", "cursive" !important;
}

body.avasta-font-style-5 * {
    font-family: "Courier New", "monospace" !important;
}

.avasta-accessibility-panel,
.avasta-accessibility-panel * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: initial !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .avasta-accessibility-panel {
        left: 10px;
        bottom: 10px;
    }

    .avasta-accessibility-content {
        width: 280px;
        bottom: 55px;
    }

    .avasta-accessibility-toggle {
        width: 50px;
        height: 50px;
    }

    .avasta-accessibility-toggle svg {
        width: 20px;
        height: 20px;
    }

    body.avasta-font-adjusted * {
        max-font-size: 24px !important;
    }
}

@media (max-width: 480px) {
    .avasta-accessibility-content {
        position: fixed;
        bottom: 70px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
    }

    .avasta-accessibility-toggle {
        width: 45px;
        height: 45px;
    }

    .avasta-accessibility-toggle svg {
        width: 18px;
        height: 18px;
    }

    body.avasta-font-adjusted * {
        max-font-size: 20px !important;
    }
}

/* Content positioning adjustment to prevent overlap */
@media (max-width: 350px) {
    .avasta-accessibility-content {
        max-height: 300px;
    }
}
