/* PDF Search Pro - Elegant Design */

.psp-search-wrapper {
    --psp-primary: #2563eb;
    --psp-primary-hover: #1d4ed8;
    --psp-bg: #f8fafc;
    --psp-text: #1e293b;
    --psp-text-light: #64748b;
    --psp-border: #e2e8f0;
    --psp-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    
    margin: 2rem 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Search Box */
.psp-search-box {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--psp-shadow);
    border: 1px solid var(--psp-border);
}

.psp-input-group {
    display: flex;
    align-items: center;
    background: var(--psp-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.psp-input-group:focus-within {
    border-color: var(--psp-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.psp-search-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    color: var(--psp-text-light);
}

#psp-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--psp-text);
    outline: none;
}

#psp-search-btn {
    background: var(--psp-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: 1rem;
}

#psp-search-btn:hover {
    background: var(--psp-primary-hover);
}

/* Filters */
.psp-filters {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-left: 0.5rem;
}

.psp-filter-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--psp-text-light);
}

.psp-filter-item input {
    margin-right: 0.5rem;
}

.psp-filter-item span {
    transition: color 0.2s;
}

.psp-filter-item input:checked + span {
    color: var(--psp-primary);
    font-weight: 600;
}

/* Modal */
.psp-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.psp-modal-content {
    background-color: white;
    margin: 5vh auto;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pspModalSlide 0.3s ease-out;
}

@keyframes pspModalSlide {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.psp-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--psp-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.psp-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--psp-text);
}

.psp-close {
    color: var(--psp-text-light);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.psp-close:hover {
    background: var(--psp-bg);
    color: var(--psp-text);
}

.psp-modal-body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
    background: var(--psp-bg);
}

/* Result Items */
.psp-result-item {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.25rem;
    border: 1px solid var(--psp-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.psp-result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--psp-shadow);
}

.psp-result-icon {
    font-size: 1.5rem;
    background: var(--psp-bg);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.psp-result-content {
    flex: 1;
}

.psp-result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.psp-result-type-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    background: #e2e8f0;
    color: #475569;
}

.psp-result-pdf .psp-result-type-badge {
    background: #fee2e2;
    color: #dc2626;
}

.psp-result-title {
    margin: 0;
    font-size: 1.1rem;
}

.psp-result-title a {
    color: var(--psp-text);
    text-decoration: none;
    transition: color 0.2s;
}

.psp-result-title a:hover {
    color: var(--psp-primary);
}

.psp-result-excerpt {
    font-size: 0.9rem;
    color: var(--psp-text-light);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.psp-result-excerpt strong {
    color: var(--psp-text);
    background: #fef08a;
    padding: 0 2px;
    border-radius: 2px;
}

.psp-result-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--psp-text-light);
    border-top: 1px solid var(--psp-border);
    padding-top: 0.75rem;
}

/* Loader */
.psp-loader-wrapper {
    text-align: center;
    padding: 3rem 0;
}

.psp-loader {
    border: 3px solid var(--psp-border);
    border-top: 3px solid var(--psp-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: pspSpin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes pspSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.psp-no-results {
    text-align: center;
    padding: 3rem 0;
    color: var(--psp-text-light);
}
