/*
 * ACE Grammar Engine
 * Conjugation result table
 */

* {
    box-sizing: border-box;
}

html {
    direction: rtl;
}

body {
    margin: 0;
    padding: 24px;
    background: #f4f6f8;
    color: #202124;
    font-family: Tahoma, Arial, sans-serif;
}

.ace-conjugation {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
}

.ace-conjugation h1 {
    margin: 0 0 20px;
    color: #17365d;
    text-align: center;
}

.ace-conjugation table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ace-conjugation th,
.ace-conjugation td {
    padding: 12px 14px;
    border: 1px solid #d8dde3;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.ace-conjugation thead th {
    background: #17365d;
    color: #ffffff;
    font-weight: 700;
}

.ace-conjugation tbody tr:nth-child(even) {
    background: #f7f9fb;
}

.ace-conjugation tbody tr:hover {
    background: #eef4fa;
}

.ace-conjugation .arabic {
    direction: rtl;
    font-size: 1.35rem;
    font-weight: 600;
}

.ace-conjugation .latin,
.ace-conjugation .number {
    direction: ltr;
    unicode-bidi: embed;
}

.ace-conjugation .result {
    color: #8b1e1e;
    font-size: 1.75rem;
    font-weight: 700;
}

@media (max-width: 700px) {
    body {
        padding: 12px;
    }

    .ace-conjugation h1 {
        font-size: 1.5rem;
    }

    .ace-conjugation th,
    .ace-conjugation td {
        padding: 10px;
    }
}
.language-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.language-label {
    color: #374151;
    font-size: 0.95rem;
    font-weight: 700;
}

.urdu-label,
html[lang="ur"] .bilingual {
    font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", serif;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    width: 0;
    height: 0;
    opacity: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background-color: #64748b;
    border-radius: 999px;
    transition: 0.25s;
}

.toggle-slider::before {
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    content: "";
    background-color: #ffffff;
    border-radius: 50%;
    transition: 0.25s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #166534;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.language-label.active {
    color: #166534;
}
