/**
 * APSS Search Overlay Styles
 */

.apss-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: opacity 0.3s ease;
}

.apss-trigger:hover {
    opacity: 0.7;
}

.apss-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    padding-top: 15vh;
    animation: apssFadeIn 0.3s ease-out;
}

@keyframes apssFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.apss-search-container {
    width: 100%;
    padding: 0 40px;
    position: relative;
}

.apss-close {
    position: absolute;
    top: -40px;
    right: 40px;
    background: none;
    border: none;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    padding: 10px;
}

.apss-search-inner {
    text-align: center;
}

.apss-search-title {
    font-size: 48px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 40px;
    color: #1a1a1a;
}

.apss-search-field-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto 60px;
}

.apss-search-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #eaeaea;
    padding: 20px 0;
    font-weight: 700;
    color: #1a1a1a;
    outline: none;
    background: transparent;
    text-align: center;
    transition: border-color 0.3s ease;
}

.apss-search-input::placeholder {
    text-align: center;
    font-weight: 700;
    color: #999;
}

.apss-search-input:focus {
    border-color: #333;
}

/* Spinner */
.apss-spinner {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: apssSpin 1s linear infinite;
}

@keyframes apssSpin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Results Grid */
.apss-search-results {
    margin-top: 40px;
    text-align: left;
}

.apss-results-section {
    margin-bottom: 60px;
}

.apss-section-header {
    margin-bottom: 30px;
}

.apss-section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.apss-section-separator {
    border: 0;
    height: 1px;
    background: #eaeaea;
    margin: 0;
}

.apss-results-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
}

@media (min-width: 600px) {
    .apss-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .apss-results-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.apss-result-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid transparent;
}

.apss-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: #eee;
}

.apss-result-image {
    width: 100px;
    height: 100px;
    min-width: 100px;
    background-color: #f9f9f9;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0;
}

.apss-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apss-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.apss-result-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.apss-result-excerpt {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.apss-result-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #999;
}

.apss-result-meta svg {
    opacity: 0.6;
}

.apss-no-results {
    font-size: 20px;
    color: #666;
    margin-top: 40px;
    text-align: center;
}

/* Body lock when overlay is open */
body.apss-overlay-open {
    overflow: hidden;
}
