/* Zakat Livestock – UI polish */
:root {
    --zla-radius: 10px;
    --zla-border: var(--zakat-border, #d1e7dd);
    --zla-muted: var(--zakat-muted, #6b7280);
    --zla-primary: var(--zakat-primary, #002866);
    --zla-bg-soft: #f8fafc;
}

.zla-fields .zla-row {
    display: grid;
    gap: 12px;
}

@media (min-width:640px) {
    .zla-fields .zla-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Perfect alignment for the Hawl checkbox + label */
.zla-checkfield {
    display: grid;
    grid-template-columns: 20px 1fr;
    /* [checkbox] [label] */
    align-items: center;
    column-gap: 10px;
}

.zla-checkfield .zla-check {
    margin: 0;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    vertical-align: middle;
    /* لون علامة الصح (مدعوم على المتصفحات الحديثة) */
    accent-color: var(--zakat-primary, #002866);
}

.zla-checkfield .zla-checklabel {
    margin: 0;
    line-height: 1.35;
}

/* دعم اتجاه RTL تلقائيًا: ضع الـ checkbox يمين النص */
[dir="rtl"] .zla-checkfield {
    grid-template-columns: 1fr 20px;
    /* [label] [checkbox] */
}

[dir="rtl"] .zla-checkfield .zla-check {
    grid-column: 2;
}

[dir="rtl"] .zla-checkfield .zla-checklabel {
    grid-column: 1;
}


/* Help tooltip button */
.zla-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 6px;
    border-radius: 50%;
    border: 1px solid var(--zla-border);
    background: #fff;
    color: var(--zla-muted);
    font-weight: 700;
    cursor: help;
    position: relative;
    line-height: 1;
    font-size: 12px;
}

.zla-help:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 40, 102, .12);
}

.zla-help::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    bottom: -6px;
    opacity: 0;
    pointer-events: none;
    background: #111;
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    padding: 8px 10px;
    border-radius: 8px;
    width: max-content;
    max-width: 280px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
    white-space: normal;
    transition: opacity .15s ease, transform .15s ease;
}

.zla-help:hover::after,
.zla-help:focus::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.zla-help.zla-inline {
    margin-left: 10px;
    padding: 0 6px;
    width: auto;
    height: auto;
    border-radius: 999px;
    border: 1px solid var(--zla-border);
    background: #fff;
    cursor: help;
}

.zla-help.zla-inline::after {
    transform: translateX(-50%) translateY(10px);
}

/* Accordion */
.zla-accordion {
    margin-top: 8px;
    border: 1px solid var(--zla-border);
    border-radius: var(--zla-radius);
    background: #fff;
}

.zla-accordion>summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.zla-accordion>summary::-webkit-details-marker {
    display: none;
}

.zla-accordion>summary::after {
    content: "";
    margin-left: auto;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--zla-muted);
    border-bottom: 2px solid var(--zla-muted);
    transform: rotate(-45deg);
    transition: transform .2s ease;
}

.zla-accordion[open]>summary::after {
    transform: rotate(45deg);
}

.zla-sum-title {
    font-weight: 700;
}

.zla-sum-sub {
    color: var(--zla-muted);
    font-size: 12px;
}

.zla-accordion-body {
    padding: 10px 14px 14px;
    background: var(--zla-bg-soft);
    border-top: 1px solid var(--zla-border);
    border-bottom-left-radius: var(--zla-radius);
    border-bottom-right-radius: var(--zla-radius);
}

/* Checklist with crisp SVG check */
.zla-checklist {
    margin: 8px 0 12px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

.zla-checklist li {
    position: relative;
    padding-left: 26px;
}

/* Checklist with robust ✓ icon (no mask) */
.zla-checklist {
    margin: 8px 0 12px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

.zla-checklist li {
    position: relative;
    padding-left: 26px;
    color: #111;
}

.zla-accordion-body .zla-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--zla-border);
    background: #fff;
    color: #10b981;
    /* لون العلامة */
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}


.zla-checklist li {
    color: #111;
}

/* Guide cards */
.zla-guide-grid {
    display: grid;
    gap: 10px;
}

@media (min-width:640px) {
    .zla-guide-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.zla-card {
    background: #fff;
    border: 1px solid var(--zla-border);
    border-radius: 8px;
    padding: 10px 12px;
}

.zla-card-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.zla-muted {
    color: var(--zla-muted);
}

/* Result footer (badges) */
.zla-result-foot {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.zla-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--zla-border);
    background: #fff;
    font-weight: 600;
    font-size: 12px;
}