@import url(https://use.typekit.net/kuw5mzm.css);

:root {
    --pico-font-size: 100%;
    --pico-nav-breadcrumb-divider: "/";
    --pico-font-family: ff-zwo-web-pro, var(--pico-font-family-sans-serif);
}

/* Screen vertical center */
.vertical-center {
    place-items: center;
    height: 100vh;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--pico-border-radius);
    font-size: 0.875rem;
    font-weight: bold;
}

.badge-pending {
    color: var(--pico-muted-color);
}

.badge-processing {
    background-color: var(--pico-primary);
    color: var(--pico-primary-inverse);
}

.badge-completed,
.badge-found {
    background-color: var(--pico-ins-color);
    color: white;
}

.badge-notFound {
    background-color: var(--pico-muted-color);
    color: white;
}

.badge-failed {
    background-color: var(--pico-del-color);
    color: white;
}

.badge-expired {
    background-color: var(--pico-muted-color);
    color: white;
}

/* Progress bar */
.progress {
    display: flex;
    height: 1.5rem;
    overflow: hidden;
    background-color: var(--pico-secondary-background);
    border-radius: var(--pico-border-radius);
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
    transition: width 0.3s ease;
}

.progress-bar-success {
    background-color: var(--pico-ins-color);
}

.progress-bar-danger {
    background-color: var(--pico-del-color);
}

/* Muted text */
.muted {
    color: var(--pico-muted-color);
    font-style: italic;
}

/* Navigation logo */
.nav-logo {
    border-right: 1px solid var(--pico-muted-color);
}

.nav-logo picture img {
    height: 2rem;
    width: auto;
}

/* ===========================
   Sub-navigation bar
   =========================== */
.sub-nav {
    padding-top: 0;
    padding-bottom: 0;
    margin-top: -0.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    margin-bottom: 1rem;
}

.sub-nav ul {
    margin-bottom: 0;
}

.sub-nav a {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid transparent;
}

.sub-nav a[aria-current="page"] {
    border-radius: 0;
    border-bottom-color: var(--pico-primary);
    font-weight: bold;
}

/* ===========================
   Mobile navigation toggle
   =========================== */
.nav-mobile-toggle {
    display: none;
}

@media (max-width: 992px) {
    .nav-links,
    .nav-account {
        display: none !important;
    }

    .sub-nav {
        display: none;
    }

    .nav-mobile-toggle {
        display: list-item;
    }

    .nav-logo {
        border-right: none;
    }
}

/* ===========================
   Filter bar responsive
   =========================== */
.filter-bar {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .filter-bar fieldset[role="group"] {
        flex-direction: column;
    }

    .filter-bar fieldset[role="group"] > * {
        width: 100%;
        border-radius: var(--pico-border-radius) !important;
    }
}

/* ===========================
   Pagination responsive
   =========================== */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--pico-muted-color);
}

.pagination-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: var(--pico-border-radius);
    text-decoration: none;
    font-size: 0.875rem;
    border: 1px solid var(--pico-muted-border-color);
    color: var(--pico-color);
    background: none;
}

.pagination-btn:hover {
    background-color: var(--pico-primary-focus);
}

.pagination-btn.active {
    background-color: var(--pico-primary);
    color: var(--pico-primary-inverse);
    border-color: var(--pico-primary);
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 576px) {
    .pagination-controls {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pagination-buttons {
        justify-content: center;
    }
}

/* ===========================
   Sortable table headers
   =========================== */
.sortable-header {
    text-decoration: none;
    white-space: nowrap;
    color: var(--pico-color);
}

.sortable-header:hover {
    text-decoration: underline;
}

.sort-indicator {
    font-size: 0.75rem;
}

/* ===========================
   Pre / code block overflow
   =========================== */
pre {
    overflow-x: auto;
    max-width: 100%;
}

pre code {
    white-space: pre;
}

/* ===========================
   Batch summary header
   =========================== */
.batch-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .batch-summary-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===========================
   Table whitespace fix
   =========================== */
table th,
table td {
    white-space: nowrap;
}

table td:last-child,
table th:last-child {
    white-space: nowrap;
}

/* Allow description columns to wrap */
table td.wrap {
    white-space: normal;
}

/* ===========================
   Batch form - request rows
   =========================== */
.request-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.request-row input,
.request-row select {
    margin-bottom: 0;
}

.request-row-remove {
    padding: 0.5rem 0.75rem;
    margin: 0;
    line-height: 1;
    font-size: 1.25rem;
    min-width: 2.5rem;
}

@media (max-width: 768px) {
    .request-row {
        grid-template-columns: 1fr auto;
    }

    .request-row input {
        grid-column: 1 / -1;
    }
}

/* Batch form - type selector as inline radio group */
.batch-type-group {
    display: flex;
    gap: 1.5rem;
}

.batch-type-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0;
}

.batch-type-group input[type="radio"] {
    margin: 0;
}

/* Batch form - add row button */
.batch-add-row {
    width: auto;
    margin-top: 0.25rem;
}

/* Batch form - help text */
.batch-help-text {
    display: block;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.batch-csv-help p,
.batch-csv-help ul {
    margin-bottom: 0.5rem;
    font-size: 0.925rem;
}

.batch-csv-help ul {
    padding-left: 1.25rem;
}

.batch-csv-help li {
    margin-bottom: 0.25rem;
}

.batch-csv-help code {
    font-size: 0.85em;
    padding: 0.1rem 0.35rem;
}

.batch-csv-example pre {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    margin: 0;
    overflow-x: auto;
}

.batch-csv-example pre code {
    padding: 0;
    background: none;
}

/* ===========================
   Responsive table / accordion
   =========================== */
.mobile-accordion {
    display: none;
}

@media (max-width: 768px) {
    .desktop-table {
        display: none;
    }

    .mobile-accordion {
        display: block;
    }
}

.accordion-item {
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    margin-bottom: 0.5rem;
}

.accordion-item summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.925rem;
}

.accordion-item[open] summary {
    border-bottom: 1px solid var(--pico-muted-border-color);
    margin-bottom: 0;
}

.accordion-item dl {
    padding: 0.75rem 1rem;
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    font-size: 0.875rem;
}

.accordion-item dt {
    font-weight: 600;
    color: var(--pico-muted-color);
    white-space: nowrap;
}

.accordion-item dd {
    margin: 0;
    overflow-wrap: break-word;
}

.accordion-item .accordion-actions {
    padding: 0.5rem 1rem 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===========================
   Table batch actions toolbar
   =========================== */
.batch-toolbar {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--pico-primary-focus);
    border: 1px solid var(--pico-primary);
    border-radius: var(--pico-border-radius);
    flex-wrap: wrap;
}

.batch-toolbar-count {
    font-weight: 600;
    font-size: 0.925rem;
    margin-right: auto;
}

.batch-toolbar button {
    margin: 0;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    width: auto;
}

table .select-col {
    width: 2.5rem;
    text-align: center;
}

table .select-col input[type="checkbox"] {
    margin: 0;
}

@media (max-width: 576px) {
    .batch-toolbar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
