/* Doodmaan leaderboard — override the --dlb-* variables (or use the Elementor style controls) to re-theme. */
.dlb {
    --dlb-accent: #f59e0b;
    --dlb-bg: #ffffff;
    --dlb-text: #1f2937;
    --dlb-muted: #6b7280;
    --dlb-border: #eef0f3;
    --dlb-row-hover: #fafafa;
    --dlb-gold: #fff7e0;
    --dlb-silver: #f3f4f6;
    --dlb-bronze: #fdf0e6;
    --dlb-radius: 16px;

    direction: rtl;
    text-align: right;
    font-family: 'Iran-sansx', 'IRANSansX', Tahoma, sans-serif;
    color: var(--dlb-text);
    background: var(--dlb-bg);
    border: 1px solid var(--dlb-border);
    border-radius: var(--dlb-radius);
    box-shadow: 0 6px 24px rgba(17, 24, 39, 0.06);
    padding: 20px;
    box-sizing: border-box;
}

.dlb *,
.dlb *::before,
.dlb *::after {
    box-sizing: inherit;
    font-family: inherit;
}

.dlb__title {
    margin: 0 0 16px;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.6;
    color: var(--dlb-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dlb__title::before {
    content: '';
    width: 6px;
    height: 1.2em;
    border-radius: 3px;
    background: var(--dlb-accent);
}

.dlb__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dlb__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid var(--dlb-border);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.dlb__row:hover {
    background: var(--dlb-row-hover);
}

.dlb__row--top1 { background: var(--dlb-gold); border-color: #fde68a; }
.dlb__row--top2 { background: var(--dlb-silver); border-color: #e5e7eb; }
.dlb__row--top3 { background: var(--dlb-bronze); border-color: #f5d0b5; }

.dlb__rank {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    background: #f3f4f6;
    color: var(--dlb-muted);
}

.dlb__row--top .dlb__rank {
    background: transparent;
    font-size: 1.6rem;
}

.dlb__who {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dlb__name {
    font-weight: 700;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dlb__meta {
    font-size: 0.8rem;
    color: var(--dlb-muted);
}

.dlb__score {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    line-height: 1.3;
}

.dlb__score strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dlb-accent);
}

.dlb__score small {
    font-size: 0.7rem;
    color: var(--dlb-muted);
}

.dlb__empty {
    margin: 0;
    padding: 24px 12px;
    text-align: center;
    color: var(--dlb-muted);
    background: #f9fafb;
    border-radius: 12px;
}

/* District picker */
.dlb__picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.dlb__picker-label {
    font-size: 0.9rem;
    color: var(--dlb-muted);
    white-space: nowrap;
}

.dlb__select {
    flex: 1 1 auto;
    max-width: 260px;
    padding: 8px 12px;
    border: 1px solid var(--dlb-border);
    border-radius: 10px;
    background: #fff;
    color: var(--dlb-text);
    font-size: 0.95rem;
}

.dlb__select:focus {
    outline: 2px solid var(--dlb-accent);
    outline-offset: 1px;
}

.dlb__panel + .dlb__panel {
    margin-top: 20px;
}

.dlb__panel-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
}

/* Without JS every district panel shows; with JS only the selected one, and the picker replaces the headings. */
.dlb__picker { display: none; }
.dlb--js .dlb__picker { display: flex; }
.dlb--js .dlb__panel { display: none; margin-top: 0; }
.dlb--js .dlb__panel.is-active { display: block; }
.dlb--js .dlb__panel-title { display: none; }

@media (max-width: 480px) {
    .dlb { padding: 14px; }
    .dlb__row { padding: 8px 10px; gap: 8px; }
    .dlb__rank { flex-basis: 32px; height: 32px; font-size: 0.85rem; }
    .dlb__row--top .dlb__rank { font-size: 1.3rem; }
    .dlb__score { min-width: 52px; }
}
