/*
 * Archive toolbar (search + sort dropdown) and restyled pagination numbers,
 * applied to the blog archive and the Institute News archive. Loaded
 * alongside article.css so it inherits the same --tam-art-* vars.
 */

.tam-art-news-archive {
    padding-top: 48px;
}

.tam-art-archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 28px;
}

.tam-art-archive-toolbar--end {
    justify-content: flex-end;
}

.tam-art-search-form {
    flex: 1 1 280px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--tam-art-border, #CDCDCD);
    border-radius: 999px;
    padding: 5px 5px 5px 18px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

html[dir="rtl"] .tam-art-search-form {
    padding: 5px 18px 5px 5px;
}

.tam-art-search-form:focus-within {
    border-color: var(--tam-art-accent, #937FC7);
    box-shadow: 0 0 0 4px rgba(147, 127, 199, .15);
}

.tam-art-search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--tam-art-font, inherit);
    background: transparent;
    border: none;
    padding: 8px 0;
    font-size: .92rem;
    color: var(--tam-art-primary, #252525);
}

.tam-art-search-input:focus {
    outline: none;
}

button.tam-art-search-btn {
    flex: none;
    width: 38px;
    height: 38px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background: var(--tam-art-secondary, #FF6D1C);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

button.tam-art-search-btn svg {
    flex: none;
    width: 18px;
    height: 18px;
}

button.tam-art-search-btn:hover {
    background: var(--tam-art-secondary, #FF6D1C);
    color: #fff;
    transform: scale(1.05);
}

.tam-art-sort-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.tam-art-sort-label {
    font-size: .9rem;
    color: var(--tam-art-text, #6b6b6b);
    white-space: nowrap;
}

.tam-art-sort-select {
    font-family: var(--tam-art-font, inherit);
    background: #fff;
    border: 1px solid var(--tam-art-border, #CDCDCD);
    border-radius: 999px;
    padding: 9px 18px;
    font-size: .92rem;
    color: var(--tam-art-primary, #252525);
    cursor: pointer;
}

.tam-art-sort-select:focus {
    outline: 2px solid var(--tam-art-accent, #937FC7);
    outline-offset: 1px;
}

/* WordPress core's the_posts_pagination() markup (used by every one of our
   own archive/search templates), restyled to match the rest of the site
   instead of the theme's bare number list. Scoped to our own wrapper div
   rather than nav.navigation.pagination so it doesn't depend on WP core's
   exact class names. */

.tam-art-pagination nav {
    display: flex;
    justify-content: center;
}

.tam-art-pagination .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.tam-art-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--tam-art-border, #CDCDCD);
    color: var(--tam-art-primary, #252525);
    text-decoration: none;
    font-weight: 700;
    font-size: .92rem;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.tam-art-pagination .page-numbers.current {
    background: var(--tam-art-secondary, #FF6D1C);
    border-color: var(--tam-art-secondary, #FF6D1C);
    color: #fff;
}

.tam-art-pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

.tam-art-pagination a.page-numbers:hover {
    border-color: var(--tam-art-secondary, #FF6D1C);
    color: var(--tam-art-secondary, #FF6D1C);
}
