/* ===== Поиск по сайту pcarbon.ru ===== */

.pc-search {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
}
@media (min-width: 640px) {
    .pc-search { padding: 3rem 1rem; }
}

.pc-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    animation: pcSearchFade 200ms ease-out;
}

.pc-search-panel {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 2rem);
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: pcSearchSlide 220ms ease-out;
}
@media (min-width: 640px) {
    .pc-search-panel { max-height: calc(100vh - 6rem); }
}

.pc-search-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid #e7e5e4;
    background: #fafaf9;
}

.pc-search-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.pc-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.125rem;
    height: 1.125rem;
    color: #94a3b8;
    pointer-events: none;
}

.pc-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.75rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #0f172a;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.pc-search-input:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.pc-search-spinner {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(13, 148, 136, 0.25);
    border-top-color: #0d9488;
    border-radius: 50%;
    animation: pcSearchSpin 700ms linear infinite;
}

.pc-search-close {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: Arial, sans-serif;
}
.pc-search-close:hover { background: #f5f5f4; color: #0f172a; }

.pc-search-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem 1.5rem;
}

.pc-search-hint,
.pc-search-empty {
    color: #64748b;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9375rem;
}

.pc-search-meta {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}
.pc-search-meta strong { color: #0f172a; }

.pc-search-section { margin-bottom: 1.5rem; }
.pc-search-section:last-child { margin-bottom: 0; }

.pc-search-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0d9488;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e7e5e4;
}
.pc-search-count {
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}

.pc-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pc-search-item {
    display: block;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 150ms ease;
}
.pc-search-item:hover { background: #fafaf9; }

.pc-search-item-title {
    color: #0f172a;
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.35;
}
.pc-search-item:hover .pc-search-item-title { color: #0d9488; }

.pc-search-item-desc {
    color: #64748b;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes pcSearchFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pcSearchSlide {
    from { transform: translateY(-12px); opacity: 0 }
    to { transform: translateY(0); opacity: 1 }
}
@keyframes pcSearchSpin {
    to { transform: translateY(-50%) rotate(360deg) }
}
