body{
    overflow-x:hidden;
}

/*
 * Doc Search – Stylesheet
 * File: /wp-content/themes/your-theme/doc-search/doc-search.css
 */

/* ── Reset ───────────────────────────────────────────────────────────────── */
.doc-search-wrapper *,
.doc-search-wrapper *::before,
.doc-search-wrapper *::after { box-sizing: border-box; }

/* ── Variables ───────────────────────────────────────────────────────────── */
.doc-search-wrapper {
    --ds-accent:       #1a56db;
    --ds-accent-light: #ebf2ff;
    --ds-border:       #d1d5db;
    --ds-bg:           #ffffff;
    --ds-bg-head:      #f8fafc;
    --ds-text:         #111827;
    --ds-text-muted:   #6b7280;
    --ds-radius:       8px;
    --ds-shadow:       0 1px 3px rgba(0,0,0,.10);
    --ds-shadow-focus: 0 0 0 3px rgba(26,86,219,.25);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ds-text);
}

/* ── Search input ────────────────────────────────────────────────────────── */
.doc-search-form        { margin-bottom: 16px; }
.doc-search-input-group { position: relative; display: flex; align-items: center; max-width: 480px; }

.doc-search-icon {
    position: absolute; left: 14px;
    color: var(--ds-text-muted); pointer-events: none;
    display: flex; align-items: center;
}

.doc-search-input {
    width: 100%;
    padding: 11px 40px 11px 42px;
    font-size: 15px;
    color: var(--ds-text);
    background: var(--ds-bg);
    border: 1.5px solid var(--ds-border);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.doc-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.doc-search-input:focus {
    border-color: var(--ds-accent);
    box-shadow: var(--ds-shadow-focus);
}
.doc-search-input::placeholder { color: var(--ds-text-muted); }

.doc-search-clear {
    position: absolute; right: 10px;
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; padding: 0;
    background: transparent; border: none; border-radius: 50%;
    color: var(--ds-text-muted); cursor: pointer;
    transition: background .15s, color .15s;
}
.doc-search-clear:hover { background: #f3f4f6; color: var(--ds-text); }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.doc-search-status {
    display: flex; align-items: center; gap: 8px;
    min-height: 24px; font-size: 13px;
    color: var(--ds-text-muted); margin-bottom: 8px;
}
.doc-search-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid #e5e7eb; border-top-color: var(--ds-accent);
    border-radius: 50%; animation: ds-spin .6s linear infinite;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ── Table wrapper (horizontal scroll on mobile) ─────────────────────────── */
.ds-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1.5px solid var(--ds-border);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow);
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.ds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
    background: var(--ds-bg);
}

.ds-table thead tr {
    background: var(--ds-bg-head);
    border-bottom: 2px solid var(--ds-border);
}

.ds-table th {
    padding: 11px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--ds-text-muted);
    white-space: nowrap;
}

.ds-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--ds-text);
    vertical-align: middle;
}

.ds-table tbody tr:last-child td { border-bottom: none; }

.ds-table tbody tr:hover td { background: var(--ds-accent-light); }

/* Serial number column */
.ds-table td:first-child,
.ds-table th:first-child {
    color: var(--ds-text-muted);
    font-weight: 600;
    width: 40px;
    text-align: center;
}

/* Clickable title */
.ds-title-link {
    color: var(--ds-accent);
    text-decoration: none;
    font-weight: 600;
}
.ds-title-link:hover { text-decoration: underline; }

/* ── Status badge ────────────────────────────────────────────────────────── */
.doc-search-meta-status {
    display: inline-flex; align-items: center;
    padding: 2px 9px;
    font-size: 11px; font-weight: 700;
    letter-spacing: .4px; text-transform: uppercase;
    border-radius: 99px;
    background: #e5e7eb; color: #374151;
}
.doc-status-active    { background: #d1fae5; color: #065f46; }
.doc-status-expired   { background: #fee2e2; color: #991b1b; }
.doc-status-pending   { background: #fef3c7; color: #92400e; }
.doc-status-suspended { background: #ede9fe; color: #5b21b6; }

/* ── No results / error ──────────────────────────────────────────────────── */
.doc-search-no-results,
.doc-search-error {
    margin: 0; padding: 18px 20px;
    font-size: 14px; color: var(--ds-text-muted);
    border: 1.5px solid var(--ds-border);
    border-radius: var(--ds-radius);
    background: var(--ds-bg); text-align: center;
}
.doc-search-error { color: #b91c1c; border-color: #fca5a5; background: #fff1f2; }

/* ── Accessibility ───────────────────────────────────────────────────────── */
.screen-reader-text {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media ( max-width: 480px ) {
    .doc-search-input { font-size: 16px; }
}