/* Archive list: a plain ruled list with tilted cover thumbnails and
   outlined pill buttons. Colours follow the site's brown palette; the
   accent, field background, text and muted colours can be overridden per
   widget from Elementor's Style tab. */
.obd-archive {
    --obd-ar-accent: #3d2000;   /* rules, borders, badges, titles */
    --obd-ar-card: #fffdf7;     /* search / dropdown background */
    --obd-ar-ink: #2A2016;
    --obd-ar-muted: #6B5C47;    /* 5.9:1 on white */
    --obd-ar-gold: #C19A45;     /* focus ring */
    --obd-ar-rule: #D9CCB4;
    --obd-ar-hover: #F3EBDC;
    --obd-ar-ease: cubic-bezier(0.23, 1, 0.32, 1);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    font-family: "kohinoor bongla", "Kohinoor Bangla", system-ui, sans-serif;
    color: var(--obd-ar-ink);
}
.obd-archive *,
.obd-archive *::before,
.obd-archive *::after { box-sizing: border-box; }
.obd-archive [hidden] { display: none !important; }

/* ---------- Toolbar: search + dropdowns ---------- */
.obd-archive__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.obd-archive__search,
.obd-archive__select {
    display: flex;
    align-items: center;
    margin: 0;
    border: 1.5px solid var(--obd-ar-accent);
    border-radius: 999px;
    background: var(--obd-ar-card);
}
.obd-archive__search {
    flex: 1 1 280px;
    gap: 10px;
    padding: 0 18px;
}
.obd-archive__search svg {
    flex: none;
    color: var(--obd-ar-accent);
}
.obd-archive__select {
    position: relative;
    flex: 0 0 auto;
    min-width: 190px;
}
/* Chevron, since the native arrow is removed below. */
.obd-archive__select::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -5px;
    border-right: 1.8px solid var(--obd-ar-accent);
    border-bottom: 1.8px solid var(--obd-ar-accent);
    transform: rotate(45deg);
    pointer-events: none;
}

.obd-archive .obd-archive__search input,
.obd-archive .obd-archive__select select {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 13px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
}
.obd-archive .obd-archive__select select {
    padding: 13px 44px 13px 18px;
    border-radius: 999px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.obd-archive .obd-archive__search input::placeholder { color: var(--obd-ar-muted); opacity: 1; }
.obd-archive .obd-archive__search input:focus,
.obd-archive .obd-archive__select select:focus { outline: none; box-shadow: none; }
.obd-archive__search:focus-within,
.obd-archive__select:focus-within {
    outline: 3px solid var(--obd-ar-gold);
    outline-offset: 2px;
}

.obd-archive__count {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--obd-ar-muted);
}

/* ---------- List ---------- */
.obd-archive .obd-archive__list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--obd-ar-accent);
}

.obd-archive .obd-archive__item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin: 0;
    padding: 18px 0;
    border-bottom: 1.5px solid var(--obd-ar-rule);
}

/* Cover thumbnail, slightly tilted like a paper laid on the table. */
.obd-archive__thumb {
    position: relative;
    display: block;
    width: 64px;
    height: 84px;
    background: #fff;
    transform: rotate(-2deg);
    box-shadow: 0 4px 12px rgba(61, 32, 0, 0.18);
}
.obd-archive .obd-archive__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: top;
    border-radius: 0;
}
.obd-archive__ext {
    position: absolute;
    bottom: 6px;
    left: -6px;
    padding: 4px 6px;
    background: var(--obd-ar-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

/* No preview available: a stamped label with the file extension. */
.obd-archive__type {
    display: grid;
    place-items: center;
    width: 64px;
    height: 72px;
    background: var(--obd-ar-accent);
    outline: 2px dashed rgba(255, 255, 255, 0.85);
    outline-offset: -5px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.obd-archive__body { min-width: 0; }

.obd-archive .obd-archive__title {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    color: var(--obd-ar-accent);
}
.obd-archive .obd-archive__title a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.obd-archive .obd-archive__title a:hover { text-decoration: underline; text-underline-offset: 3px; }

.obd-archive .obd-archive__desc {
    margin: 2px 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--obd-ar-ink);
}
.obd-archive .obd-archive__meta {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--obd-ar-muted);
}

/* ---------- Buttons ---------- */
.obd-archive__actions {
    display: flex;
    gap: 8px;
}
.obd-archive .obd-archive__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 9px 14px;
    border: 1.5px solid var(--obd-ar-accent);
    border-radius: 999px;
    background: transparent;
    color: var(--obd-ar-accent);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.16s var(--obd-ar-ease), background-color 0.15s ease;
}
.obd-archive .obd-archive__btn:hover {
    background: var(--obd-ar-hover);
    color: var(--obd-ar-accent);
    border-color: var(--obd-ar-accent);
}
.obd-archive .obd-archive__btn:active { transform: scale(0.97); }
.obd-archive .obd-archive__btn:focus-visible { outline: 3px solid var(--obd-ar-gold); outline-offset: 2px; }
.obd-archive .obd-archive__btn svg { flex: none; }

.obd-archive__more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}
.obd-archive .obd-archive__more { padding: 11px 26px; font-size: 15px; }

.obd-archive__empty {
    margin: 0;
    padding: 24px 0;
    color: var(--obd-ar-muted);
}
.obd-archive__empty--static {
    border-top: 2px solid var(--obd-ar-accent);
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    .obd-archive__select { flex: 1 1 100%; }
    .obd-archive .obd-archive__item { grid-template-columns: 52px minmax(0, 1fr); }
    .obd-archive__thumb,
    .obd-archive__type { width: 52px; height: 68px; }
    .obd-archive__actions { grid-column: 2; }
    /* Icon-only buttons; the label stays available to screen readers. */
    .obd-archive .obd-archive__btn { padding: 10px 14px; }
    .obd-archive__btn-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .obd-archive .obd-archive__btn { transition: none; }
    .obd-archive .obd-archive__btn:active { transform: none; }
}
