/* arabic-keyboard.css — on-screen Arabic keyboard (shared with kairawan-frontend; keep identical). */

.akb-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 32px;
    align-self: stretch;
    margin-inline-start: 4px;
    padding: 0;
    border: 1px solid var(--akb-border, rgba(0, 0, 0, .18));
    border-radius: 6px;
    background: var(--akb-bg, #fff);
    color: var(--akb-fg, #333);
    font: 600 16px/1 "Noto Sans Arabic", "Amiri", "Segoe UI", Tahoma, sans-serif;
    cursor: pointer;
    vertical-align: middle;
    transition: background .12s, border-color .12s;
}
.akb-toggle:hover,
.akb-toggle.is-open {
    background: var(--akb-accent-bg, #eef2ff);
    border-color: var(--akb-accent, #4f46e5);
    color: var(--akb-accent, #4f46e5);
}
.akb-toggle:focus-visible {
    outline: 2px solid var(--akb-accent, #4f46e5);
    outline-offset: 1px;
}

.akb-panel {
    position: fixed;
    z-index: 2147483000;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid var(--akb-border, rgba(0, 0, 0, .18));
    border-radius: 10px;
    background: var(--akb-panel-bg, #fff);
    color: var(--akb-fg, #222);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    direction: rtl;
    user-select: none;
    -webkit-user-select: none;
}
.akb-panel--sheet {
    border-radius: 12px 12px 0 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

.akb-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-bottom: 4px;
}
.akb-row:last-child { margin-bottom: 0; }

.akb-key {
    flex: 1 1 0;
    min-width: 0;
    height: 38px;
    padding: 0;
    border: 1px solid var(--akb-key-border, rgba(0, 0, 0, .12));
    border-radius: 6px;
    background: var(--akb-key-bg, #f7f7f8);
    color: inherit;
    font: 500 20px/1 "Noto Sans Arabic", "Amiri", "Segoe UI", Tahoma, sans-serif;
    cursor: pointer;
    touch-action: manipulation;
    transition: background .08s, transform .05s;
}
.akb-key:hover { background: var(--akb-key-hover, #ebedf5); }
.akb-key:active { transform: translateY(1px); background: var(--akb-accent-bg, #e0e7ff); }
.akb-key:focus-visible { outline: 2px solid var(--akb-accent, #4f46e5); outline-offset: -1px; }

.akb-row--actions .akb-key { font-size: 16px; }
.akb-key--action { flex: 0 0 16%; }
.akb-key--space  { flex: 1 1 auto; }
.akb-key--close  { flex: 0 0 12%; color: var(--akb-muted, #777); }

@media (prefers-color-scheme: dark) {
    .akb-toggle { --akb-bg: #1f2024; --akb-fg: #e6e6e6; --akb-border: rgba(255,255,255,.18); --akb-accent-bg: #2b2d55; }
    .akb-panel  { --akb-panel-bg: #1f2024; --akb-fg: #e6e6e6; --akb-border: rgba(255,255,255,.18);
                  --akb-key-bg: #2a2b31; --akb-key-hover: #34363f; --akb-key-border: rgba(255,255,255,.1); --akb-accent-bg: #2b2d55; }
}
