/* Oqat Shari v3 – archive page. Theme-agnostic: inherits font/colour, uses translucent surfaces so it works on light and dark skins. */
.oqat-archive {
    --oa: #0a66ff;
    --oa-soft: rgba(10, 102, 255, .10);
    --oa-line: rgba(127, 127, 127, .24);
    --oa-surface: rgba(127, 127, 127, .06);
    --oa-muted: rgba(127, 127, 127, .95);
    color: inherit;
    font-family: inherit;
    line-height: 1.7;
    margin: 0 0 30px;
}

.oqat-archive *,
.oqat-archive *::before,
.oqat-archive *::after {
    box-sizing: border-box;
}

.oqat-archive a {
    text-decoration: none;
    color: inherit;
}

.oqat-archive [hidden] {
    display: none !important;
}

/* breadcrumb */
.oqat-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--oa-muted);
    margin: 0 4px 12px;
}

.oqat-crumbs a:hover {
    color: var(--oa);
}

/* hero */
.oqat-hero {
    position: relative;
    border: 1px solid var(--oa-line);
    border-radius: 20px;
    padding: 30px 26px 24px;
    margin-bottom: 18px;
    background:
        radial-gradient(120% 140% at 100% 0%, var(--oa-soft) 0%, rgba(10, 102, 255, 0) 60%),
        var(--oa-surface);
    overflow: hidden;
}

.oqat-hero::after {
    content: "";
    position: absolute;
    inset-inline-start: -60px;
    bottom: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(10, 102, 255, .14), rgba(10, 102, 255, 0) 70%);
    pointer-events: none;
}

.oqat-hero-text h1 {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 3.2vw, 2rem);
    line-height: 1.5;
    font-weight: 800;
    color: inherit;
}

.oqat-hero-text p {
    margin: 0 0 20px;
    font-size: .95rem;
    opacity: .78;
    max-width: 62ch;
}

/* search */
.oqat-search {
    position: relative;
    margin: 0;
}

.oqat-search input[type="search"] {
    width: 100%;
    height: 56px;
    padding-block: 0;
    padding-inline: 54px 48px;
    border: 2px solid var(--oa-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    color: #111827;
    font: inherit;
    font-size: 1rem;
    box-shadow: 0 6px 22px rgba(15, 23, 42, .06);
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.oqat-search input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.oqat-search input[type="search"]::placeholder {
    color: #6b7280;
}

.oqat-search input[type="search"]:focus {
    outline: none;
    border-color: var(--oa);
    box-shadow: 0 0 0 4px var(--oa-soft), 0 6px 22px rgba(15, 23, 42, .08);
}

.oqat-search-icon {
    position: absolute;
    inset-inline-start: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--oa);
    pointer-events: none;
}

.oqat-clear {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(107, 114, 128, .18);
    color: #374151;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.oqat-clear:hover {
    background: rgba(107, 114, 128, .3);
}

/* popular */
.oqat-popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 18px;
}

.oqat-popular-label {
    font-size: .82rem;
    font-weight: 700;
    opacity: .75;
}

.oqat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.oqat-chip {
    padding: 6px 14px;
    border: 1px solid var(--oa-line);
    border-radius: 999px;
    font-size: .88rem;
    background: rgba(255, 255, 255, .55);
    color: inherit;
    transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}

.dark-skin .oqat-chip,
body.dark-skin .oqat-chip {
    background: rgba(255, 255, 255, .06);
}

.oqat-chip:hover,
.oqat-chip:focus-visible {
    background: var(--oa);
    border-color: var(--oa);
    color: #fff !important;
    transform: translateY(-1px);
}

/* toolbar */
.oqat-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 2px 12px;
}

.oqat-tabs {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--oa-line);
    border-radius: 14px;
    background: var(--oa-surface);
}

.oqat-tabs button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    opacity: .75;
    transition: background-color .15s, color .15s, opacity .15s;
}

.oqat-tabs button:hover {
    opacity: 1;
}

.oqat-tabs button.is-active {
    background: var(--oa);
    color: #fff;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(10, 102, 255, .28);
}

.oqat-count {
    font-size: .88rem;
    opacity: .8;
}

.oqat-count b {
    font-weight: 800;
    color: var(--oa);
}

/* letters */
.oqat-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 2px 18px;
}

.oqat-letters a {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--oa-line);
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 700;
    background: var(--oa-surface);
    transition: background-color .15s, color .15s, border-color .15s;
}

.oqat-letters a:hover,
.oqat-letters a:focus-visible {
    background: var(--oa);
    border-color: var(--oa);
    color: #fff;
}

.oqat-archive.is-searching .oqat-letters,
.oqat-archive.is-prov .oqat-letters {
    display: none;
}

/* groups */
.oqat-group {
    margin-bottom: 26px;
    scroll-margin-top: 90px;
}

.oqat-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 0;
    font-size: 1.05rem;
    line-height: 1.4;
    font-weight: 800;
    border: 0;
    color: inherit;
}

.oqat-group-title::before,
.oqat-group-title::after {
    content: none;
}

.oqat-group-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: var(--oa-soft);
    color: var(--oa);
    white-space: nowrap;
}

.oqat-group-title small {
    font-size: .78rem;
    font-weight: 500;
    opacity: .65;
}

.oqat-group-title small::after {
    content: "";
}

/* city cards */
.oqat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.oqat-city {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--oa-line);
    border-radius: 16px;
    background: var(--oa-surface);
    color: inherit;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.oqat-city:hover,
.oqat-city:focus-visible {
    transform: translateY(-3px);
    border-color: var(--oa);
    background: var(--oa-soft);
    box-shadow: 0 10px 24px rgba(10, 102, 255, .14);
    color: inherit;
}

.oqat-city.is-first {
    border-color: var(--oa);
    box-shadow: 0 0 0 3px var(--oa-soft);
}

.oqat-city-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.oqat-city-name {
    font-weight: 800;
    font-size: 1.02rem;
}

.oqat-city-prov {
    font-size: .74rem;
    opacity: .6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oqat-city-times {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding-top: 10px;
    border-top: 1px dashed var(--oa-line);
    text-align: center;
}

.oqat-city-times span {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.oqat-city-times em {
    font-style: normal;
    font-size: .7rem;
    opacity: .6;
}

.oqat-city-times b {
    font-size: .95rem;
    font-weight: 800;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

/* empty + note */
.oqat-empty {
    text-align: center;
    padding: 34px 16px;
    border: 1px dashed var(--oa-line);
    border-radius: 16px;
    opacity: .85;
}

.oqat-note {
    margin: 22px 4px 0;
    font-size: .8rem;
    opacity: .6;
    text-align: center;
}

@media (max-width: 640px) {
    .oqat-hero {
        padding: 22px 16px 18px;
        border-radius: 16px;
    }

    .oqat-search input[type="search"] {
        height: 52px;
    }

    .oqat-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .oqat-city {
        padding: 12px;
    }

    .oqat-city-head {
        flex-direction: column;
        gap: 0;
    }

    .oqat-tabs {
        width: 100%;
    }

    .oqat-tabs button {
        flex: 1;
        padding: 8px 6px;
    }

    .oqat-letters a {
        min-width: 30px;
        height: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oqat-archive * {
        transition: none !important;
        transform: none !important;
    }
}
