/* ──────────────────────────────────────────────
   Ally Handler – Restyle the legacy toolbar toggle
   to match the Ally cloud widget's circular design.
   ────────────────────────────────────────────── */

/* ── Toggle button: dark circle with white icon ── */
.pojo-a11y-toolbar-toggle {
    position: fixed !important;
    bottom: 20px !important;
    z-index: 10001 !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: #4B9B2B !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    cursor: pointer !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Right-side position (default for RTL or explicit right) */
.pojo-a11y-toolbar-toggle.pojo-a11y-toolbar-right,
.pojo-a11y-toolbar-right .pojo-a11y-toolbar-toggle {
    right: 20px !important;
    left: auto !important;
}

/* Left-side position */
.pojo-a11y-toolbar-toggle.pojo-a11y-toolbar-left,
.pojo-a11y-toolbar-left .pojo-a11y-toolbar-toggle {
    left: 20px !important;
    right: auto !important;
}

/* ── Toggle link inside the circle ── */
.pojo-a11y-toolbar-toggle .pojo-a11y-toolbar-toggle-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ── SVG icon inside the toggle ── */
.pojo-a11y-toolbar-toggle .pojo-a11y-toolbar-toggle-link svg {
    width: 26px !important;
    height: 26px !important;
    fill: #fff !important;
    color: #fff !important;
}

/* ── Hover state ── */
.pojo-a11y-toolbar-toggle:hover {
    background: #3D8224 !important;
    transform: scale(1.05);
}

/* ── EA11Y cloud widget (kept for fallback) ── */
/* Position is intentionally NOT overridden here —
   it follows the plugin's iconSettings.position config */
#ea11y-root {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    overflow: visible !important;
    z-index: 10001 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* ── Expanded Toolbar Panel: Zain Green Theme ── */

/* Panel Overlay / Background */
#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay {
    border-color: #4B9B2B !important;
    background: #fff !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1) !important;
}

/* Panel Header / Title */
#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay p.pojo-a11y-toolbar-title {
    background: #4B9B2B !important;
    color: #fff !important;
    padding: 12px 15px !important;
    margin: 0 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Toolbar Items List */
#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items {
    padding: 5px 0 !important;
}

/* Item Links */
#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items li.pojo-a11y-toolbar-item a {
    color: #444 !important;
    transition: all 0.2s ease !important;
}

/* Active State */
#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items li.pojo-a11y-toolbar-item a.active {
    background: rgba(75, 155, 43, 0.1) !important;
    color: #4B9B2B !important;
    border-right: 3px solid #4B9B2B !important;
}

/* Icons inside items */
#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items li.pojo-a11y-toolbar-item a svg {
    fill: currentColor !important;
    margin-right: 8px !important;
}

/* Hover State */
#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items li.pojo-a11y-toolbar-item a:hover {
    background: #f9f9f9 !important;
    color: #4B9B2B !important;
}

/* Reset Link Section */
#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items.pojo-a11y-links {
    border-top: 1px solid #eee !important;
}

/* Global toggle button green theme */
.ea11y-widget-open-button {
    background-color: #70A838 !important;
}

.ea11y-dismiss-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: bold !important;
    line-height: 20px !important;
    text-align: center;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}

.ea11y-dismiss-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}


/* Native-look Confirmation Modal */
.ea11y-hide-widget-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2147483648;
    background-color: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease-out;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ea11y-hide-widget-modal--open {
    opacity: 1;
    visibility: visible;
}

.ea11y-hide-widget-modal__content {
    width: 444px;
    max-width: calc(100% - 32px);
    border-radius: 4px;
    background-color: #f3f4f6;
    /* Light gray background like in screenshot */
    cursor: default;
    box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12);
    overflow: hidden;
}

.ea11y-hide-widget-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #fff;
}

.ea11y-hide-widget-modal__header svg {
    flex-shrink: 0;
}

.ea11y-hide-widget-modal__header .ea11y-widget-typography--subtitle1 {
    margin: 0;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #0c0d0e;
}

.ea11y-hide-widget-modal__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, .12);
    border-bottom: 1px solid rgba(0, 0, 0, .12);
    padding: 24px;
}

.ea11y-widget-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.ea11y-widget-radio__input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.ea11y-widget-radio .ea11y-widget-typography--body1 {
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: #0c0d0e;
}

.ea11y-hide-widget-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 16px 24px;
    background: #fff;
}

.ea11y-widget-button {
    font-family: 'Zain', sans-serif !important;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 28px;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    text-transform: none;
}

.ea11y-widget-button--text {
    background-color: #5A8A2E;
    color: #fff;
}

.ea11y-widget-button--text:hover {
    background-color: #4A7524;
}

.ea11y-widget-button--contained {
    background-color: #70A838;
    color: #fff;
    box-shadow: none;
}

.ea11y-widget-button--contained:hover {
    background-color: #5A8A2E;
}

.ea11y-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2147483646;
    display: none;
    backdrop-filter: blur(2px);
}

.ea11y-modal-overlay.active {
    display: block;
}

.ea11y-confirm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #f8f9fa;
    width: 420px;
    max-width: 90%;
    z-index: 2147483647;
    display: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    text-align: left;
}

.ea11y-confirm-modal.active {
    display: block;
}

.ea11y-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ea11y-modal-header svg {
    width: 24px;
    height: 24px;
    background: #70A838;
    border-radius: 50%;
    padding: 2px;
    fill: #fff;
}

.ea11y-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

.ea11y-modal-body {
    padding: 25px 40px;
}

.ea11y-radio-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ea11y-radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    color: #333;
}

.ea11y-radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #2563eb;
}

.ea11y-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
}

.ea11y-modal-footer .cancel-btn {
    background: none;
    border: none;
    color: #4b5563;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    padding: 8px 12px;
}

.ea11y-modal-footer .cancel-btn:hover {
    color: #1a1a1a;
}

.ea11y-modal-footer .confirm-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.ea11y-modal-footer .confirm-btn:hover {
    background: #1d4ed8;
}

.ea11y-internal-dismiss-btn {
    cursor: pointer;
}

.ea11y-internal-dismiss-btn .pojo-a11y-toolbar-icon {
    color: #f44336;
}

.ea11y-internal-dismiss-btn:hover .pojo-a11y-toolbar-text {
    text-decoration: underline;
}