/* ==============================================
   PDF Search Mobile – Scoped under .pdf-search-mobile-wrapper
   All selectors are prefixed so nothing leaks out.
   ============================================== */

.pdf-search-mobile-wrapper {
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 20px 16px 40px;
    box-sizing: border-box;
}

/* ---- Header ---- */
.pdf-search-mobile-wrapper .pdf-mobile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    justify-content: center;
}

.pdf-search-mobile-wrapper .pdf-mobile-search-icon {
    width: 28px;
    height: 28px;
    color: #0073aa;
    flex-shrink: 0;
}

.pdf-search-mobile-wrapper .pdf-mobile-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
}

/* ---- Input ---- */
.pdf-search-mobile-wrapper .pdf-mobile-input-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
}

.pdf-search-mobile-wrapper #pdf-mobile-search-input {
    width: 100%;
    padding: 14px 44px 14px 16px;
    font-size: 16px;
    color: #1a1a1a;
    border: 2px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
}

.pdf-search-mobile-wrapper #pdf-mobile-search-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.pdf-search-mobile-wrapper #pdf-mobile-search-input::placeholder {
    color: #98a2b3;
}

.pdf-search-mobile-wrapper .pdf-mobile-clear-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #98a2b3;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.pdf-search-mobile-wrapper .pdf-mobile-clear-btn:hover,
.pdf-search-mobile-wrapper .pdf-mobile-clear-btn:active {
    background: #f2f4f7;
    color: #475467;
}

/* ---- Suggestions ---- */
.pdf-search-mobile-wrapper .pdf-mobile-suggestions {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.pdf-search-mobile-wrapper .pdf-mobile-suggestion {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #0073aa;
    background: #eaf5ff;
    border: 1px solid #b8dbf0;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.pdf-search-mobile-wrapper .pdf-mobile-suggestion:active {
    transform: scale(0.95);
    background: #cce5f6;
}

/* ---- Result count ---- */
.pdf-search-mobile-wrapper #pdf-mobile-search-count {
    width: 100%;
    font-size: 13px;
    color: #667085;
    margin-bottom: 10px;
    min-height: 20px;
    text-align: right;
}

/* ---- Loading spinner ---- */
.pdf-search-mobile-wrapper #pdf-mobile-search-loading {
    display: flex;
    justify-content: center;
    padding: 24px 0;
}

.pdf-search-mobile-wrapper .pdf-mobile-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e4e7ec;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: pdfMobileSpin 0.7s linear infinite;
}

@keyframes pdfMobileSpin {
    to { transform: rotate(360deg); }
}

/* ---- Results ---- */
.pdf-search-mobile-wrapper #pdf-mobile-search-results {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pdf-search-mobile-wrapper .pdf-mobile-result-card {
    background: #fff;
    padding: 14px 16px;
    border-radius: 10px;
    border-right: 4px solid #0073aa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background 0.2s, box-shadow 0.2s;
}

.pdf-search-mobile-wrapper .pdf-mobile-result-card:active {
    background: #f0f7fc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.pdf-search-mobile-wrapper .pdf-mobile-result-card a {
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    display: block;
    line-height: 1.5;
}

.pdf-search-mobile-wrapper .pdf-mobile-no-result {
    text-align: center;
    color: #98a2b3;
    font-size: 14px;
    padding: 20px 0;
}
