/* ================================================
   FexoPay — fp-accessibility.css
   Цветове: #e8384b (червено) | #434448 (тъмно сиво)
   ================================================ */

/* --- Skip link --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: #e8384b;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 0 0 8px 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    z-index: 99999;
    transition: top 0.2s ease;
    font-family: 'Open Sans', Arial, sans-serif;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #434448;
    outline-offset: 2px;
    color: #ffffff;
}

/* --- Focus styles --- */
*:focus-visible {
    outline: 3px solid #e8384b;
    outline-offset: 3px;
    border-radius: 3px;
}
*:focus:not(:focus-visible) { outline: none; }

/* --- Widget контейнер — изолиран --- */
#fp-a11y-container {
    font-size: 14px !important;
    line-height: normal !important;
    font-family: 'Open Sans', Arial, sans-serif !important;
}

/* --- Floating бутон --- */
#fp-a11y-btn {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8384b 0%, #b8222e 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(232, 56, 75, 0.45), 0 2px 6px rgba(0,0,0,0.2);
    z-index: 10001;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}
#fp-a11y-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(232, 56, 75, 0.55), 0 3px 8px rgba(0,0,0,0.25);
}
#fp-a11y-btn:focus {
    outline: 3px solid #434448;
    outline-offset: 3px;
}
#fp-a11y-btn svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    pointer-events: none;
}

/* --- Панел --- */
#fp-panel {
    position: fixed;
    bottom: 94px;
    left: 28px;
    width: 320px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(232, 56, 75, 0.15),
        0 8px 24px rgba(0,0,0,0.10),
        0 0 0 1px rgba(232, 56, 75, 0.08);
    display: none;
    z-index: 10002;
    overflow: hidden;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
}
#fp-panel.open { display: block; }

/* ---- Header ---- */
.fp-panel-header {
    background: linear-gradient(135deg, #e8384b 0%, #b8222e 100%);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}
.fp-panel-header::after {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.fp-header-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.fp-header-icon svg { width: 20px; height: 20px; }
.fp-header-text {
    display: flex; flex-direction: column; flex: 1;
}
.fp-panel-title {
    color: #ffffff;
    font-size: 15px; font-weight: 800;
    margin: 0; letter-spacing: 0.02em;
    font-family: 'Open Sans', Arial, sans-serif;
}
.fp-panel-sub {
    color: rgba(255,255,255,0.65);
    font-size: 11px; margin: 2px 0 0;
    font-family: 'Open Sans', Arial, sans-serif;
}
.fp-header-badge {
    width: 30px; height: 30px;
    background: #434448;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #ffffff;
    font-size: 16px; font-weight: 900;
    flex-shrink: 0; letter-spacing: -1px;
    font-family: 'Open Sans', Arial, sans-serif;
}

/* ---- Body ---- */
.fp-panel-body {
    padding: 8px 0;
    max-height: 70vh;
    overflow-y: auto;
}
.fp-panel-body::-webkit-scrollbar { width: 4px; }
.fp-panel-body::-webkit-scrollbar-track { background: transparent; }
.fp-panel-body::-webkit-scrollbar-thumb { background: #f0c0c5; border-radius: 4px; }

/* ---- Row ---- */
.fp-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 18px;
    transition: background 0.15s;
    gap: 10px;
}
.fp-row:hover { background: #fdf3f4; }
.fp-row + .fp-row { border-top: 1px solid #fae8e9; }

.fp-row-info {
    display: flex; align-items: center;
    gap: 10px; flex: 1; min-width: 0;
}
.fp-row-icon {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, #fde8ea 0%, #f9ced1 100%);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    color: #e8384b; flex-shrink: 0;
    font-family: 'Open Sans', Arial, sans-serif;
}
.fp-row-label {
    font-size: 13px; color: #434448;
    font-weight: 700; line-height: 1.2;
    font-family: 'Open Sans', Arial, sans-serif;
}
.fp-row-sub {
    font-size: 11px; color: #999999;
    margin-top: 1px; font-weight: 500;
    font-family: 'Open Sans', Arial, sans-serif;
}

/* Акцентна линия при активен toggle */
.fp-row:has(.fp-toggle.on) {
    border-left: 3px solid #e8384b;
    padding-left: 15px;
}

/* ---- Stepper ---- */
.fp-stepper {
    display: flex; align-items: center;
    gap: 4px; flex-shrink: 0;
}
.fp-step-btn {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1.5px solid #f0b0b5;
    background: #fde8ea;
    cursor: pointer;
    font-size: 11px; font-weight: 800;
    color: #e8384b;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    transition: all 0.15s;
    font-family: 'Open Sans', Arial, sans-serif;
}
.fp-step-btn:hover {
    background: #e8384b;
    color: #ffffff;
    border-color: #e8384b;
}
.fp-step-val {
    font-size: 11px; font-weight: 800;
    color: #e8384b;
    min-width: 34px; text-align: center;
    font-family: 'Open Sans', Arial, sans-serif;
}

/* ---- Toggle switch ---- */
.fp-toggle {
    position: relative;
    width: 44px; height: 24px;
    border-radius: 12px;
    background: #d0d0d0;
    border: none; cursor: pointer;
    transition: background 0.25s;
    flex-shrink: 0; padding: 0;
}
.fp-toggle.on {
    background: linear-gradient(135deg, #e8384b, #b8222e);
}
.fp-toggle::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: left 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.fp-toggle.on::after { left: 23px; }

/* ---- Footer ---- */
.fp-panel-footer {
    padding: 12px 18px;
    border-top: 1px solid #fae8e9;
    display: flex; justify-content: center; align-items: center;
    background: #fff9f9;
}
.fp-reset {
    font-size: 12px; color: #e8384b;
    background: none;
    border: 1.5px solid #f0b0b5;
    border-radius: 6px; cursor: pointer;
    padding: 7px 16px;
    font-weight: 600; font-family: 'Open Sans', Arial, sans-serif;
    transition: all 0.15s;
    display: flex; align-items: center; gap: 4px;
}
.fp-reset:hover {
    background: #e8384b;
    color: #ffffff;
    border-color: #e8384b;
}

/* ================================================
   ACCESSIBILITY РЕЖИМИ — върху #fp-page-wrapper
   Widget-ът е ИЗВЪН wrapper-а => не се засяга
   ================================================ */

/* Висок контраст */
#fp-page-wrapper.fp-high-contrast { filter: contrast(1.6); }

/* Инвертирани цветове */
#fp-page-wrapper.fp-invert {
    filter: invert(1) hue-rotate(180deg);
}
body:has(#fp-page-wrapper.fp-invert) {
    background-color: #000000 !important;
}
#fp-page-wrapper.fp-invert img,
#fp-page-wrapper.fp-invert video,
#fp-page-wrapper.fp-invert iframe {
    filter: invert(1) hue-rotate(180deg);
}

/* Тъмен режим */
#fp-page-wrapper.fp-dark {
    background-color: #111111 !important;
    color: #e0e0e0 !important;
}
#fp-page-wrapper.fp-dark p,
#fp-page-wrapper.fp-dark li,
#fp-page-wrapper.fp-dark h1, #fp-page-wrapper.fp-dark h2,
#fp-page-wrapper.fp-dark h3, #fp-page-wrapper.fp-dark h4,
#fp-page-wrapper.fp-dark h5, #fp-page-wrapper.fp-dark h6,
#fp-page-wrapper.fp-dark span, #fp-page-wrapper.fp-dark td,
#fp-page-wrapper.fp-dark th, #fp-page-wrapper.fp-dark div {
    color: #e0e0e0 !important;
}
#fp-page-wrapper.fp-dark a { color: #f48a8a !important; }
#fp-page-wrapper.fp-dark .container,
#fp-page-wrapper.fp-dark .container-fluid,
#fp-page-wrapper.fp-dark section,
#fp-page-wrapper.fp-dark .card,
#fp-page-wrapper.fp-dark .footer {
    background-color: #1a1a1a !important;
    border-color: #444444 !important;
}
#fp-page-wrapper.fp-dark footer,
#fp-page-wrapper.fp-dark header,
#fp-page-wrapper.fp-dark .navigation {
    background-color: #0d0d0d !important;
}
#fp-page-wrapper.fp-dark .nav-link {
    color: #e0e0e0 !important;
}
#fp-page-wrapper.fp-dark .button {
    background-color: #b8222e !important;
    color: #ffffff !important;
}

/* Подчертаване на линкове */
body.fp-underline a {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 2px !important;
    text-decoration-color: #e8384b !important;
}

/* OpenDyslexic */
body.fp-dyslexia,
body.fp-dyslexia p, body.fp-dyslexia li,
body.fp-dyslexia h1, body.fp-dyslexia h2, body.fp-dyslexia h3,
body.fp-dyslexia h4, body.fp-dyslexia h5, body.fp-dyslexia h6,
body.fp-dyslexia a, body.fp-dyslexia span,
body.fp-dyslexia td, body.fp-dyslexia th {
    font-family: 'OpenDyslexic', Arial, sans-serif !important;
    line-height: 1.9 !important;
    letter-spacing: 0.04em !important;
}

/* Голям курсор */
body.fp-big-cursor,
body.fp-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M8 4 L8 38 L16 30 L22 44 L28 41 L22 27 L34 27 Z' fill='%23e8384b' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E") 4 4, auto !important;
}
