/* ==========================================================================
   ACCESSFLOW — CSS STYLESHEET v2.0 (Widget Aksesibilitas 2.2.2 Style)
   ========================================================================== */

/* --- 0. FONTS --- */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/plusjakartasans/v8/LDIbaomQNQcsA88c7O9yZ4KMCoOg4IA6-91aHEjcWuA_m079QB_VIKg.woff2) format('woff2');
}

/* --- 1. DESIGN TOKENS & VARIABLES --- */
:root {
    /* Brand Color */
    --af-brand: #0048ff;
    --af-brand-hover: #0036cc;
    --af-brand-light: rgba(0, 72, 255, 0.08);
    --af-brand-light2: rgba(0, 72, 255, 0.12);
    --af-brand-semi: rgba(0, 72, 255, 0.5);
    --af-brand-faint: rgba(0, 72, 255, 0.04);

    /* Surface Colors (Light Theme) */
    --af-bg-light: #f4f6fa;
    --af-surface-light: #ffffff;
    --af-border-light: rgba(0, 0, 0, 0.06);
    --af-text-light: #1a1a2e;
    --af-text-secondary-light: #8c8c9e;

    /* Surface Colors (Dark Theme) */
    --af-bg-dark: #1a1a2e;
    --af-surface-dark: #252540;
    --af-border-dark: rgba(255, 255, 255, 0.08);
    --af-text-dark: #f1f5f9;
    --af-text-secondary-dark: #94a3b8;

    /* Active Theme Variables (mapped dynamically) */
    --af-bg: var(--af-bg-light);
    --af-surface: var(--af-surface-light);
    --af-border: var(--af-border-light);
    --af-text: var(--af-text-light);
    --af-text-secondary: var(--af-text-secondary-light);

    /* Semantic Colors */
    --af-success: #10b981;
    --af-danger: #ef4444;
    --af-focus-ring: #0048ff;

    /* Dimensions */
    --af-fab-size: 86px;
    --af-fab-inner: 58px;
    --af-fab-core: 50px;
    --af-panel-width: 400px;
    --af-radius: 24px;
    --af-radius-sm: 16px;
    --af-radius-xs: 14px;

    /* Transitions */
    --af-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --af-transition-fast: 150ms ease;
    --af-transition-normal: 300ms var(--af-ease);
    --af-transition-slow: 500ms var(--af-ease);

    /* Typography */
    --af-font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Z-Index */
    --af-z-index: 2147483640;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
    :root {
        --af-transition-fast: 0ms !important;
        --af-transition-normal: 0ms !important;
        --af-transition-slow: 0ms !important;
    }
    .accessflow-fab-outer { animation: none !important; }
}

/* --- 2. FLOATING ACTION BUTTON (FAB) — 3-Ring Design --- */
.accessflow-fab-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: var(--af-z-index);
    font-family: var(--af-font);
    user-select: none;
}

.accessflow-fab-container.position-right {
    left: auto;
    right: 24px;
}

/* Outer button container — 72px transparent image container */
.accessflow-fab-outer {
    width: var(--af-fab-size);
    height: var(--af-fab-size);
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.3s var(--af-ease);
    border: none;
    outline: none;
    padding: 0;
    touch-action: none;
}

.accessflow-fab-outer:hover {
    width: 92px;
    height: 92px;
    box-shadow: none;
    transform: scale(1.08);
}

.accessflow-fab-outer:active {
    transform: scale(0.96);
}

.accessflow-fab-outer:focus-visible {
    box-shadow: 0 0 0 4px var(--af-focus-ring);
}

@keyframes afPulseRing {
    0%, 100% { box-shadow: 0 4px 20px var(--af-brand-semi), 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 0px rgba(0, 72, 255, 0.25); }
    50% { box-shadow: 0 4px 20px var(--af-brand-semi), 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 12px rgba(0, 72, 255, 0); }
}

/* Middle ring — white */
.accessflow-fab-middle {
    width: var(--af-fab-inner);
    height: var(--af-fab-inner);
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--af-ease);
    pointer-events: none;
}

.accessflow-fab-outer:hover .accessflow-fab-middle {
    width: 64px;
    height: 64px;
}

/* Inner ring — gradient with icon */
.accessflow-fab-inner {
    width: var(--af-fab-core);
    height: var(--af-fab-core);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--af-brand), rgba(0, 72, 255, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--af-ease);
    pointer-events: none;
}

.accessflow-fab-outer:hover .accessflow-fab-inner {
    width: 56px;
    height: 56px;
}

.accessflow-fab-inner svg {
    width: 28px;
    height: 28px;
    fill: white;
    pointer-events: none;
}

/* Badge */
.accessflow-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--af-danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: var(--af-font);
}

/* --- 3. ACCESSIBILITY PANEL — Full-Height Side Slide --- */
.accessflow-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--af-panel-width);
    height: 100vh;
    z-index: var(--af-z-index);
    font-family: var(--af-font);
    display: flex;
    flex-direction: column;
    transform: translateX(calc(-1 * var(--af-panel-width)));
    transition: transform var(--af-transition-slow);
    pointer-events: none;
}

.accessflow-panel.open {
    transform: translateX(0);
    pointer-events: auto;
}

/* Right-side panel */
.accessflow-panel.position-right {
    left: auto;
    right: 0;
    transform: translateX(var(--af-panel-width));
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.accessflow-panel.position-right.open {
    transform: translateX(0);
}

/* Panel Gradient Header */
.accessflow-panel-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 8vh;
    min-height: 60px;
    background: linear-gradient(180deg, var(--af-brand) 0%, rgba(0, 72, 255, 0.9) 100%);
    border-top-right-radius: var(--af-radius);
    padding: 0 20px;
    box-sizing: border-box;
    justify-content: center;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.18), 2px 0 10px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.accessflow-panel.position-right .accessflow-panel-header {
    border-top-right-radius: 0;
    border-top-left-radius: var(--af-radius);
}

.accessflow-panel-header-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.accessflow-panel-title {
    display: flex;
    flex-direction: column;
    width: 65%;
    align-items: flex-start;
    margin: 0;
    padding: 0;
}

.accessflow-panel-title-text {
    color: white;
    font-size: 18px;
    font-family: var(--af-font);
    font-weight: 800;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.accessflow-panel-header-actions {
    display: flex;
    flex-direction: column;
    width: 35%;
    align-items: flex-end;
}

/* Close Button */
.accessflow-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    padding: 0;
}

.accessflow-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.32);
    transform: rotate(90deg);
}

.accessflow-close-btn:focus-visible {
    outline: 2px solid white;
}

.accessflow-close-btn svg {
    fill: white;
    width: 12px;
    height: 12px;
}

/* Panel Content Area — rounded top, light bg */
.accessflow-panel-content-area {
    flex: 1;
    background-color: var(--af-bg);
    background-image: linear-gradient(180deg, #f8f9fc 0%, #eef1f7 100%);
    border-top-right-radius: var(--af-radius);
    border-top-left-radius: var(--af-radius);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.accessflow-theme-dark .accessflow-panel-content-area {
    background-color: var(--af-bg-dark);
    background-image: linear-gradient(180deg, #1e1e36 0%, #16162a 100%);
}

/* Panel Scrollable Body */
.accessflow-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Custom Scrollbar */
.accessflow-panel-body::-webkit-scrollbar {
    width: 4px;
    display: inherit;
}

.accessflow-panel-body:hover::-webkit-scrollbar {
    width: 6px;
}

.accessflow-panel-body::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 8px;
}

.accessflow-panel-body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 72, 255, 0.35);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.accessflow-panel-body::-webkit-scrollbar-thumb:hover {
    background: var(--af-brand);
}

/* Search bar inside content area */
.accessflow-search-container {
    padding: 14px 20px;
    border-bottom: 1px solid var(--af-border);
    background: var(--af-surface);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.accessflow-search-wrapper {
    position: relative;
}

.accessflow-search-input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 1.5px solid rgba(0, 72, 255, 0.2);
    border-radius: var(--af-radius-xs);
    background: var(--af-bg);
    color: var(--af-text);
    font-size: 13px;
    font-family: var(--af-font);
    font-weight: 600;
    box-sizing: border-box;
    outline: none;
    transition: border-color var(--af-transition-fast), box-shadow var(--af-transition-fast);
}

.accessflow-search-input:focus {
    border-color: var(--af-brand);
    box-shadow: 0 0 0 3px var(--af-brand-light);
}

.accessflow-search-input::placeholder {
    color: var(--af-text-secondary);
    font-weight: 500;
}

.accessflow-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--af-text-secondary);
    pointer-events: none;
    width: 14px;
    height: 14px;
}

/* --- 4. LANGUAGE SWITCHER SECTION --- */
.accessflow-lang-section {
    display: flex;
    flex-direction: row;
    padding: 12px 20px;
    border-bottom: 1px solid var(--af-border);
    cursor: pointer;
    align-items: center;
    gap: 10px;
    background: var(--af-surface);
    flex-shrink: 0;
}

.accessflow-lang-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--af-brand), rgba(0, 72, 255, 0.8));
    flex-shrink: 0;
}

.accessflow-lang-icon svg {
    width: 14px;
    height: 14px;
}

.accessflow-lang-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--af-text);
    font-family: var(--af-font);
}

.accessflow-lang-chevron {
    transition: transform 0.3s ease;
}

.accessflow-lang-section[aria-expanded="true"] .accessflow-lang-chevron {
    transform: rotate(90deg);
}

/* Language dropdown items */
.accessflow-lang-dropdown {
    display: none;
    flex-direction: column;
    background: var(--af-surface);
    border-bottom: 1px solid var(--af-border);
    overflow: hidden;
}

.accessflow-lang-dropdown.open {
    display: flex;
}

.accessflow-lang-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    gap: 8px;
}

.accessflow-lang-item:last-child {
    border-bottom: none;
}

.accessflow-lang-item:hover {
    background-color: var(--af-brand-faint);
}

.accessflow-lang-item.active {
    background-color: var(--af-brand-light);
    border-left: 2px solid var(--af-brand);
}

.accessflow-lang-flag {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    background: var(--af-brand-light2);
    flex-shrink: 0;
    letter-spacing: 0.5px;
    color: var(--af-text);
    font-family: var(--af-font);
}

.accessflow-lang-item.active .accessflow-lang-flag {
    background: var(--af-brand);
    color: white;
}

.accessflow-lang-text {
    display: flex;
    flex-direction: column;
    font-family: var(--af-font);
    font-weight: 600;
    font-size: 11px;
    color: var(--af-text);
    line-height: 1.3;
}

.accessflow-lang-text-sub {
    font-size: 9px;
    color: var(--af-text-secondary);
    font-weight: 400;
}

.accessflow-lang-item.active .accessflow-lang-text {
    color: var(--af-brand);
    font-weight: 700;
}

.accessflow-lang-check {
    margin-left: auto;
    fill: var(--af-brand);
    display: none;
}

.accessflow-lang-item.active .accessflow-lang-check {
    display: flex;
}

/* --- 5. PROFILES SECTION --- */
.accessflow-profiles-section {
    padding: 12px 20px;
    border-bottom: 1px solid var(--af-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--af-surface);
    flex-shrink: 0;
}

.accessflow-profiles-icon {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--af-surface);
    border: 1px solid var(--af-border);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.accessflow-profiles-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--af-text);
    font-family: var(--af-font);
}

.accessflow-profiles-chevron {
    transition: transform 0.3s ease;
}

.accessflow-profiles-section[aria-expanded="true"] .accessflow-profiles-chevron {
    transform: rotate(90deg);
}

/* Profiles grid */
.accessflow-profiles-dropdown {
    display: none;
    flex-direction: column;
    background: var(--af-surface);
    border-bottom: 1px solid var(--af-border);
    padding: 10px 20px 15px;
}

.accessflow-profiles-dropdown.open {
    display: flex;
}

.accessflow-profiles-grid {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-content: center;
    gap: 12px 14px;
    margin-top: 5px;
}

.accessflow-profile-card {
    display: flex;
    flex-direction: row;
    border-radius: var(--af-radius-xs);
    height: 50px;
    border: 1.5px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    background-color: var(--af-surface);
    align-items: center;
    padding-left: 12px;
    transition: all 0.3s var(--af-ease);
    gap: 8px;
}

.accessflow-profile-card:hover {
    background: linear-gradient(135deg, var(--af-brand) 0%, rgba(0, 72, 255, 0.87) 100%);
    box-shadow: 0 6px 20px rgba(0, 72, 255, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: transparent;
}

.accessflow-profile-card:hover .accessflow-profile-text {
    color: white;
}

.accessflow-profile-card:hover .accessflow-profile-icon-wrap {
    background-color: rgba(0, 0, 0, 0.4);
}

.accessflow-profile-card:hover .accessflow-profile-icon-wrap svg {
    fill: white;
}

.accessflow-profile-card.active {
    background: linear-gradient(135deg, var(--af-brand) 0%, rgba(0, 72, 255, 0.87) 100%);
    box-shadow: 0 4px 16px rgba(0, 72, 255, 0.2);
    border-color: transparent;
}

.accessflow-profile-card.active .accessflow-profile-text {
    color: white;
}

.accessflow-profile-card.active .accessflow-profile-icon-wrap {
    background-color: rgba(0, 0, 0, 0.5);
}

.accessflow-profile-card.active .accessflow-profile-icon-wrap svg {
    fill: white;
}

.accessflow-profile-icon-wrap {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.accessflow-profile-icon-wrap svg {
    width: 17px;
    height: 17px;
    fill: var(--af-text);
    transition: fill 0.25s ease;
}

.accessflow-profile-text {
    font-size: 12px;
    font-family: var(--af-font);
    font-weight: 700;
    color: var(--af-text);
    transition: color 0.25s ease;
    line-height: 1.2;
}

/* --- 6. CATEGORY & FEATURE GRID CARDS --- */
.accessflow-category-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 16px 16px 4px;
    box-sizing: border-box;
}

.accessflow-category-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--af-text);
    font-family: var(--af-font);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 2px;
}

.accessflow-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-bottom: 6px;
}

/* Individual Feature Grid Card */
.accessflow-feature-card {
    border-radius: 14px;
    width: 100%;
    min-height: 105px;
    border: 1.5px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    background-color: var(--af-surface);
    transition: all 0.3s var(--af-ease);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    padding: 10px 6px 8px;
}

.accessflow-feature-card:hover {
    border: 1.5px solid rgba(0, 72, 255, 0.27);
    box-shadow: 0 8px 25px rgba(0, 72, 255, 0.13), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    background: linear-gradient(180deg, white 60%, var(--af-brand-faint) 100%);
}

.accessflow-feature-card:focus-visible {
    outline: 2px solid var(--af-focus-ring);
    outline-offset: 2px;
}

.accessflow-feature-card.active {
    border: 1.5px solid var(--af-brand);
    background: linear-gradient(180deg, white 40%, rgba(0, 72, 255, 0.06) 100%);
    box-shadow: 0 4px 16px rgba(0, 72, 255, 0.19), 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Card icon area */
.accessflow-feature-icon-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 52px;
    transition: transform 0.3s var(--af-ease);
}

.accessflow-feature-card:hover .accessflow-feature-icon-area {
    transform: scale(1.08);
}

.accessflow-feature-icon-area svg {
    width: 32px;
    height: 32px;
    fill: var(--af-text);
    transition: fill 0.25s ease;
}

.accessflow-feature-icon-area i,
.accessflow-feature-icon-area span {
    color: var(--af-text);
    transition: color 0.25s ease;
}

.accessflow-feature-card:hover .accessflow-feature-icon-area svg,
.accessflow-feature-card.active .accessflow-feature-icon-area svg {
    fill: var(--af-brand);
}

.accessflow-feature-card:hover .accessflow-feature-icon-area i,
.accessflow-feature-card.active .accessflow-feature-icon-area i,
.accessflow-feature-card:hover .accessflow-feature-icon-area span,
.accessflow-feature-card.active .accessflow-feature-icon-area span {
    color: var(--af-brand);
}

/* Card label area */
.accessflow-feature-label {
    text-align: center;
    font-size: 11.5px;
    color: var(--af-text);
    font-family: var(--af-font);
    font-weight: 700;
    letter-spacing: -0.1px;
    transition: color 0.25s ease;
    padding: 0 4px;
    line-height: 1.3;
}

.accessflow-feature-card:hover .accessflow-feature-label,
.accessflow-feature-card.active .accessflow-feature-label {
    color: var(--af-brand);
}

/* Progress Strip Indicators */
.accessflow-strip-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
    gap: 3px;
    padding: 0 20px;
    box-sizing: border-box;
}

.accessflow-strip {
    display: flex;
    flex-direction: column;
    height: 4px;
    border-radius: 4px;
    background-color: var(--af-brand);
    opacity: 0.2;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 30px;
}

.accessflow-strip.active {
    opacity: 1;
    background: linear-gradient(90deg, var(--af-brand), rgba(0, 72, 255, 0.8));
}

/* --- 7. SETTINGS SECTION --- */
.accessflow-settings-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    margin-bottom: 2vh;
}

.accessflow-settings-toggle {
    width: max-content;
    display: flex;
    flex-direction: row;
    padding-bottom: 1vh;
    padding-left: 15px;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    margin-left: 2%;
    align-self: flex-start;
}

.accessflow-settings-toggle-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--af-text);
    transition: transform 0.3s ease;
}

.accessflow-settings-toggle:hover .accessflow-settings-toggle-icon {
    transform: rotate(45deg);
}

.accessflow-settings-toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--af-text);
    font-family: var(--af-font);
}

.accessflow-settings-chevron {
    transition: transform 0.3s ease;
}

.accessflow-settings-toggle[aria-expanded="true"] .accessflow-settings-chevron {
    transform: rotate(90deg);
}

/* Position settings */
.accessflow-position-group {
    display: none;
    flex-direction: column;
    border: 1.5px solid rgba(0, 72, 255, 0.2);
    background-color: var(--af-surface);
    margin: 5px 15px;
    padding: 15px;
    border-radius: var(--af-radius-xs);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    width: 90%;
}

.accessflow-position-group.open {
    display: flex;
}

.accessflow-position-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
    width: 100%;
    gap: 8px;
}

.accessflow-position-radio {
    display: flex;
    flex-direction: column;
    background-color: transparent;
    border: 2px solid rgba(0, 72, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    height: 20px;
    width: 20px;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.accessflow-position-radio:hover {
    border-color: var(--af-brand);
}

.accessflow-position-radio:checked {
    background-color: var(--af-brand);
    box-shadow: inset 0 0 0 0.2375em white;
    border-color: var(--af-brand);
}

.accessflow-position-label {
    margin-left: 5px;
    color: var(--af-text);
    font-size: 12px;
    font-family: var(--af-font);
    font-weight: 600;
    cursor: pointer;
}

/* --- 8. RESET BUTTON & FOOTER --- */
.accessflow-reset-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 0;
}

.accessflow-reset-btn {
    display: flex;
    flex-direction: row;
    background: linear-gradient(135deg, var(--af-brand) 0%, rgba(0, 72, 255, 0.8) 100%);
    height: 52px;
    width: 90%;
    justify-content: center;
    align-items: center;
    border-radius: var(--af-radius-xs);
    box-shadow: 0 4px 16px rgba(0, 72, 255, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    border: none;
    transition: all 0.3s var(--af-ease);
    gap: 10px;
}

.accessflow-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 72, 255, 0.28), 0 4px 10px rgba(0, 0, 0, 0.12);
}

.accessflow-reset-btn:active {
    transform: translateY(0);
}

.accessflow-reset-btn svg {
    fill: white;
    width: 18px;
    height: 18px;
}

.accessflow-reset-btn-text {
    font-family: var(--af-font);
    font-weight: 700;
    font-size: 14px;
    color: white;
    letter-spacing: -0.1px;
}

/* Version info (removed) */

/* Live region utility (visually hidden screen reader announcements) */
.accessflow-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- 9. FEATURE INJECTIONS & EFFECTS --- */

/* Highlight Links */
html[data-af-highlight-links] body a:not([class*="accessflow"]):not([id*="accessflow"]) {
    outline: 2px dashed #ff007f !important;
    outline-offset: 4px !important;
    background-color: rgba(255, 255, 0, 0.25) !important;
    text-decoration: underline !important;
    text-decoration-style: double !important;
    color: #0000ff !important;
}

/* Bigger Cursor */
html[data-af-big-cursor] body *:not([class*="accessflow"]):not([id*="accessflow"]) {
    cursor: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg width='60px' height='60px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style=' stroke: black; stroke-width: 2;' d='M16.5744 19.1999L12.6361 15.2616L11.4334 16.4643C10.2022 17.6955 9.58656 18.3111 8.92489 18.1658C8.26322 18.0204 7.96225 17.2035 7.3603 15.5696L5.3527 10.1205C4.15187 6.86106 3.55146 5.23136 4.39141 4.39141C5.23136 3.55146 6.86106 4.15187 10.1205 5.35271L15.5696 7.3603C17.2035 7.96225 18.0204 8.26322 18.1658 8.92489C18.3111 9.58656 17.6955 10.2022 16.4643 11.4334L15.2616 12.6361L19.1999 16.5744C19.6077 16.9821 19.8116 17.186 19.9058 17.4135C20.0314 17.7168 20.0314 18.0575 19.9058 18.3608C19.8116 18.5882 19.6077 18.7921 19.1999 19.1999C18.7921 19.6077 18.5882 19.8116 18.3608 19.9058C18.0575 20.0314 17.7168 20.0314 17.4135 19.9058C17.186 19.8116 16.9821 19.6077 16.5744 19.1999Z' fill='%23ffffff'/%3E%3C/svg%3E"), pointer !important;
}

/* Dyslexia Friendly Font */
html[data-af-dyslexia] body *:not([class*="accessflow"]):not([id*="accessflow"]) {
    font-family: "Comic Sans MS", "Verdana", "Chalkboard SE", cursive !important;
}

/* Hide Images */
html[data-af-hide-images] body img:not([class*="accessflow"]):not([id*="accessflow"]),
html[data-af-hide-images] body svg:not([class*="accessflow"]):not([id*="accessflow"]),
html[data-af-hide-images] body picture:not([class*="accessflow"]):not([id*="accessflow"]),
html[data-af-hide-images] body [style*="background-image"]:not([class*="accessflow"]):not([id*="accessflow"]) {
    opacity: 0.05 !important;
    filter: blur(5px) !important;
    transition: opacity 0.3s;
}

/* Focus Highlight outlines */
html[data-af-focus-highlight] body *:not([class*="accessflow"]):not([id*="accessflow"]):focus-visible {
    outline: 5px solid #ffcc00 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 10px rgba(0, 0, 0, 0.8) !important;
}

/* Reading Guide Line */
.accessflow-reading-guide-line {
    position: fixed;
    left: 0;
    width: 100%;
    height: 12px;
    background: #000;
    border: solid 3px #fff300;
    border-radius: 5px;
    z-index: calc(var(--af-z-index) - 2);
    pointer-events: none;
    display: none;
    box-sizing: border-box;
}

html[data-af-reading-guide] .accessflow-reading-guide-line {
    display: block;
}

/* Reading Mask overlays */
.accessflow-reading-mask-overlay {
    position: fixed;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--af-z-index) - 2);
    pointer-events: none;
    display: none;
}

.accessflow-reading-mask-top {
    top: 0;
}

.accessflow-reading-mask-bottom {
    bottom: 0;
}

.accessflow-reading-mask-line {
    width: 100%;
    height: 8px;
    position: absolute;
    bottom: 0;
}

.accessflow-reading-mask-top .accessflow-reading-mask-line {
    background: rgb(0, 44, 176);
}

.accessflow-reading-mask-bottom .accessflow-reading-mask-line {
    background: rgb(0, 205, 136);
    bottom: auto;
    top: 0;
}

html[data-af-reading-mask] .accessflow-reading-mask-overlay {
    display: block;
}

/* Text Magnifier box */
.accessflow-magnifier-box {
    position: fixed;
    border: 3px solid var(--af-brand);
    background-color: var(--af-surface);
    color: var(--af-text);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 12px;
    font-size: 24px;
    line-height: 1.4;
    max-width: 320px;
    z-index: calc(var(--af-z-index) + 10);
    pointer-events: none;
    display: none;
    font-family: var(--af-font);
}

/* --- 10. CONTRAST MODE FILTERS & CSS CLASSES --- */

html[data-af-contrast="dark"] body *:not([class*="accessflow"]):not([id*="accessflow"]) {
    background-color: #000000 !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}
html[data-af-contrast="dark"] body a:not([class*="accessflow"]):not([id*="accessflow"]) {
    color: #60a5fa !important;
    text-decoration: underline !important;
}

html[data-af-contrast="light"] body *:not([class*="accessflow"]):not([id*="accessflow"]) {
    background-color: #ffffff !important;
    color: #090d16 !important;
    border-color: #94a3b8 !important;
}
html[data-af-contrast="light"] body a:not([class*="accessflow"]):not([id*="accessflow"]) {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

html[data-af-contrast="high"] body *:not([class*="accessflow"]):not([id*="accessflow"]) {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}
html[data-af-contrast="high"] body a:not([class*="accessflow"]):not([id*="accessflow"]) {
    color: #00ffff !important;
    text-decoration: underline !important;
}

/* Invert colors filter */
html[data-af-invert] body > *:not(#accessflow-widget-container) {
    filter: invert(1) hue-rotate(180deg) !important;
}
html[data-af-invert] body > *:not(#accessflow-widget-container) img,
html[data-af-invert] body > *:not(#accessflow-widget-container) video,
html[data-af-invert] body > *:not(#accessflow-widget-container) iframe,
html[data-af-invert] body > *:not(#accessflow-widget-container) [style*="background-image"] {
    filter: invert(1) hue-rotate(180deg) !important;
}

/* Monochrome & Saturation */
html[data-af-monochrome] body > *:not(#accessflow-widget-container) {
    filter: grayscale(1) !important;
}
html[data-af-saturate="high"] body > *:not(#accessflow-widget-container) {
    filter: saturate(2) !important;
}
html[data-af-saturate="low"] body > *:not(#accessflow-widget-container) {
    filter: saturate(0.4) !important;
}

/* Color Blind Mode Filters */
html[data-af-colorblind="protanopia"] body > *:not(#accessflow-widget-container) {
    filter: url(#accessflow-protanopia) !important;
}
html[data-af-colorblind="deuteranopia"] body > *:not(#accessflow-widget-container) {
    filter: url(#accessflow-deuteranopia) !important;
}
html[data-af-colorblind="tritanopia"] body > *:not(#accessflow-widget-container) {
    filter: url(#accessflow-tritanopia) !important;
}

/* Stop CSS Animations */
html[data-af-stop-animations] body *:not([class*="accessflow"]):not([id*="accessflow"]),
html[data-af-stop-animations] body *:not([class*="accessflow"]):not([id*="accessflow"])::before,
html[data-af-stop-animations] body *:not([class*="accessflow"]):not([id*="accessflow"])::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
}

/* Zoom via scaling */
html[data-af-zoom-active] body > *:not(#accessflow-widget-container) {
    transform: scale(1.5);
    transform-origin: top left;
    width: 66.66% !important;
}

/* --- 11. MOBILE & TABLET RESPONSIVENESS --- */
@media only screen and (max-width: 900px) {
    :root {
        --af-panel-width: 380px;
    }

    /* Keep side slide-in layout on tablet sizes (481px to 900px) */
    .accessflow-panel {
        width: var(--af-panel-width);
        transform: translateX(calc(-1 * var(--af-panel-width)));
    }

    .accessflow-panel.open {
        transform: translateX(0);
    }

    .accessflow-panel.position-right {
        transform: translateX(var(--af-panel-width));
    }

    .accessflow-panel.position-right.open {
        transform: translateX(0);
    }

    .accessflow-panel-header {
        width: 100%;
        height: 8vh;
        min-height: 60px;
    }

    .accessflow-category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .accessflow-feature-card {
        width: 100% !important;
        min-height: 96px;
        padding: 8px 4px 6px;
    }

    .accessflow-fab-container {
        bottom: 16px !important;
        left: 16px !important;
    }

    .accessflow-fab-container.position-right {
        left: auto !important;
        right: 16px !important;
    }

    .accessflow-fab-outer {
        width: 76px;
        height: 76px;
    }

    .accessflow-profiles-grid {
        gap: 10px 8px;
    }

    .accessflow-profile-card {
        padding-left: 8px;
        height: 46px;
    }
}

/* Mobile Bottom Sheet Layout */
@media only screen and (max-width: 480px) {
    :root {
        --af-panel-width: 100vw;
    }

    .accessflow-panel {
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 85vh !important;
        max-height: 85vh !important;
        border-top-left-radius: var(--af-radius) !important;
        border-top-right-radius: var(--af-radius) !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        transform: translateY(100%) !important;
        transition: transform var(--af-transition-normal) !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25) !important;
    }

    .accessflow-panel.open {
        transform: translateY(0) !important;
    }

    /* Position independent for mobile bottom sheet - left/right both behave as standard bottom sheet */
    .accessflow-panel.position-right {
        transform: translateY(100%) !important;
        border-top-right-radius: var(--af-radius) !important;
        border-top-left-radius: var(--af-radius) !important;
    }

    .accessflow-panel.position-right.open {
        transform: translateY(0) !important;
    }

    /* Add bottom sheet handle indicator at top of panel header */
    .accessflow-panel-header {
        border-top-left-radius: var(--af-radius) !important;
        border-top-right-radius: var(--af-radius) !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        padding-top: 14px !important;
        height: 70px !important;
        min-height: 70px !important;
    }

    .accessflow-panel-header::before {
        content: '';
        display: block;
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 44px;
        height: 5px;
        background-color: rgba(255, 255, 255, 0.35);
        border-radius: 3px;
    }

    .accessflow-panel-content-area {
        border-top-left-radius: var(--af-radius) !important;
        border-top-right-radius: var(--af-radius) !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        padding-bottom: calc(15px + env(safe-area-inset-bottom)) !important;
    }

    .accessflow-search-container {
        padding: 10px 16px !important;
    }

    .accessflow-lang-section,
    .accessflow-profiles-section,
    .accessflow-settings-toggle {
        padding: 10px 16px !important;
    }

    .accessflow-profiles-dropdown,
    .accessflow-lang-dropdown {
        padding: 8px 16px 12px !important;
    }

    .accessflow-category-section {
        padding: 12px 16px 4px !important;
    }

    .accessflow-feature-card {
        min-height: 86px !important;
        border-radius: 12px !important;
        padding: 6px 4px 6px !important;
    }

    .accessflow-feature-label {
        font-size: 11px !important;
    }

    .accessflow-feature-icon-area svg {
        width: 26px !important;
        height: 26px !important;
    }

    .accessflow-feature-icon-area span {
        font-size: 20px !important;
    }

    .accessflow-feature-icon-area i {
        font-size: 18px !important;
    }

    .accessflow-reset-area {
        padding: 10px 0 !important;
    }

    .accessflow-reset-btn {
        width: 90% !important;
        height: 48px !important;
    }
}
