/* Search Icon Styles */
.aps-search-container {
    display: inline-block;
}

.aps-search-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s ease;
    line-height: 1;
}

.aps-search-icon:hover {
    transform: scale(1.1);
}

/* Modal Styles */
.aps-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: apsFadeIn 0.3s ease;
}

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

.aps-modal-content {
    background-color: #fff;
    margin: 80px auto 0;
    width: 90%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: apsSlideDown 0.3s ease;
}

@keyframes apsSlideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.aps-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.aps-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.aps-search-icon-input {
    position: absolute;
    left: 15px;
    font-size: 18px;
    color: #999;
}

.aps-search-input {
    width: 100%;
    padding: 15px 45px 15px 45px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
}

.aps-search-input:focus {
    border-color: #0073aa;
}

.aps-modal-close {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0 10px;
    transition: color 0.2s ease;
}

.aps-modal-close:hover {
    color: #333;
}

.aps-modal-body {
    max-height: 500px;
    overflow-y: auto;
}

.aps-search-results {
    padding: 10px 0;
}

.aps-initial-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.aps-initial-message span {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.aps-initial-message p {
    font-size: 16px;
    margin: 0;
}

/* Result Items */
.aps-result-item {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.aps-result-item:hover {
    background-color: #f8f9fa;
}

.aps-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 5px;
}

.aps-result-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.aps-result-excerpt mark {
    background-color: #fff3cd;
    padding: 0 2px;
    border-radius: 3px;
}

/* Loading State */
.aps-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.aps-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: apsSpin 0.8s linear infinite;
    vertical-align: middle;
}

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

/* No Results State */
.aps-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.aps-no-results span {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.aps-no-results p {
    font-size: 16px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aps-modal-content {
        margin: 40px auto 0;
        width: 95%;
    }
    
    .aps-search-input {
        font-size: 16px;
        padding: 12px 40px 12px 40px;
    }
    
    .aps-modal-body {
        max-height: 400px;
    }
}