/**
 * Smooth Search Popup - CSS Styles
 * Beautiful full-page search overlay with smooth animations
 */

/* Search Trigger Icon */
.smooth-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.smooth-search-icon-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, transform 0.3s ease;
    color: inherit;
    height: 48px;
    width: 48px;
}

.smooth-search-icon-btn:hover {
    transform: scale(1.05);
    background: transparent;
}

.smooth-search-icon-btn svg {
    display: block;
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.smooth-search-text {
    display: none;
}

/* Search Overlay */
.smooth-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 40px 20px;
}

.smooth-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Search Container */
.smooth-search-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    transform: translateY(-20px);
    transition: transform 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smooth-search-overlay.active .smooth-search-container {
    transform: translateY(0);
}

/* Close Button */
.smooth-search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    opacity: 0.9;
    z-index: 10;
}

.smooth-search-close:hover {
    opacity: 1;
    transform: scale(1.05);
    background: transparent;
}

.smooth-search-close svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}


/* Search Content */
.smooth-search-content {
    width: 100%;
}

/* Search Form */
.smooth-search-form-wrapper {
    width: 100%;
}

.smooth-search-form {
    position: relative;
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    padding-bottom: 6px;
}

.smooth-search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 24px 0 6px 0;
    font-size: clamp(32px, 5vw, 48px);
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.smooth-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.smooth-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}


/* Search Results */
.smooth-search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.smooth-search-results::-webkit-scrollbar {
    width: 6px;
}

.smooth-search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.smooth-search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.smooth-search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-result-item {
    padding: 20px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s ease forwards;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.search-result-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.search-result-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.search-result-excerpt {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 8px;
}

.search-result-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Loading State */
.search-loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

.search-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .smooth-search-overlay {
        padding: 15px;
    }
    
    .smooth-search-close {
        top: -50px;
    }
    
    .smooth-search-input {
        font-size: 18px;
        padding: 15px 20px;
    }
    
    .smooth-search-submit {
        padding: 10px 20px;
    }
    
    .smooth-search-submit svg {
        width: 24px;
        height: 24px;
    }
    
    .smooth-search-results {
        max-height: 300px;
    }
    
    .search-result-title {
        font-size: 16px;
    }
    
    .search-result-excerpt {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .smooth-search-input {
        font-size: 16px;
        padding: 12px 18px;
    }
    
    .smooth-search-form-wrapper {
        margin-bottom: 30px;
    }
}

/* Prevent body scroll when overlay is active */
body.smooth-search-active {
    overflow: hidden;
}
