/* AI Content Search Frontend Styles with Semantic Search Features */

.acs-search-container {
    width: 100%;
    margin: 0 auto;
    padding: 0px;
    position: relative; 
}

/* Search Form Styles */
.acs-search-form {
    margin-bottom: 0px;
}

.acs-input-wrapper {
    display: flex;
    gap: 0px;
    background: #fff;
	border:1px solid#000;
    padding: 0px;
    transition: box-shadow 0.3s ease;
    align-items: center; 
}
.dark .acs-input-wrapper {
	border:1px solid#444;
    background: #222;	
}
.acs-input-wrapper:focus-within {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0);
}

.acs-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 20px 10px 10px;
    font-size: 16px;
    border-radius: 0;
    background: transparent;
    color: #333;
	margin-bottom:0;	
}

.acs-search-input::placeholder {
    color: #999;
}
.dark .acs-search-input {
    background: #222;	
	border:1px solid#222;	
}
.acs-search-button {
    background: #000;
    color: white;
    border: none;
    padding: 10px 24px;
	margin-bottom:0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.acs-search-button:active {
    transform: translateY(0);
}

.acs-search-button.acs-loading {
    background: #222;
    cursor: not-allowed;
    transform: none;
}

.acs-button-icon {
    font-size: 18px;
}

/* Loading Spinner */
.acs-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.acs-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Autosuggestion Styles */
.acs-autosuggest-results {
    position: absolute;
    top: 100%; /* Position below the search input */
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none; /* Hidden by default, shown by JS */
}

.acs-autosuggest-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.acs-autosuggest-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.acs-autosuggest-item:last-child {
    border-bottom: none;
}

.acs-autosuggest-item:hover {
    background-color: #f0f0f0;
}

/* Search Suggestions */
.acs-suggestions {
	width:100%;
	float:left;
    background: white;
    border: 1px solid #000;	
    padding: 15px 15px 5px;
}
.dark .acs-suggestions {
    background: #222;
    border: 1px solid #444;	
}
.acs-suggestions-header {
	width:100%;
	float:left;
    margin: 0;
    font-weight: 500;
}

.acs-suggestions-list {
    width:100%;
	float:left;	
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
	margin:10px 0;
}
.acs-suggestion-loading {
    width:100%;
	color: #666;
	font-size:14px;
}
.acs-query-suggestion {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dark .acs-query-suggestion {
    background: #444;
    border: 1px solid #444;
	color:#c0c0c0;
}
.acs-query-suggestion:hover {
    background: #000;
    border-color: #000;
    color: #fff;	
}

/* Query Information */
.acs-query-info {
	width:100%;
	float:left;
    border: 1px solid #000;
    padding: 12px 16px;
    margin-top: -1px;
}
.dark .acs-query-info {
    border: 1px solid #444;
}
.acs-query-processed,
.acs-query-intent {
    margin-bottom: 5px;
}

.acs-query-processed:last-child,
.acs-query-intent:last-child {
    margin-bottom: 0;
}

/* Search Method Indicator */
.acs-search-method {
	width:100%;
	float:left;	
    border: 1px solid #000;	
    padding: 8px 12px;
    margin: -1px 0 15px;
    text-align: center;
}
.dark .acs-search-method {
    border: 1px solid #444;	
}
.acs-search-method small {
    font-weight: 500;
}

/* Search Results */
.acs-search-results {
	width:100%;
	float:left;			
    border:1px solid#000;
    padding: 20px;
    margin-top: -1px;
}
.dark .acs-google-fallback,
.dark .acs-search-results {
    border:1px solid#444;
	background:#222;
}
.dark .acs-google-fallback p,
.dark .acs-search-resultsbp {
	color:#999;
}
.acs-results-list {
	width:100%;
	float:left;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Individual Result Item */
.acs-result-item {
    display: flex;
    gap: 15px;
    transition: all 0.5s ease;
    opacity: 0; 
    transform: translateY(50px); 
    animation: slideUp 0.5s ease forwards;
	padding: 12px;
    border: 1px solid #000;
}
.dark .acs-result-item {
    background: #191919;	
    border: 1px solid #191919;
}
@keyframes slideUp {
    to {
        opacity: 1; 
        transform: translateY(0); 
    }
}
.acs-result-item:nth-child(1) { animation-delay: 0.1s; }
.acs-result-item:nth-child(2) { animation-delay: 0.2s; }
.acs-result-item:nth-child(3) { animation-delay: 0.3s; }
.acs-result-item:nth-child(4) { animation-delay: 0.4s; }
.acs-result-item:nth-child(5) { animation-delay: 0.5s; }
.acs-result-item:nth-child(6) { animation-delay: 0.6s; }
.acs-result-item:nth-child(7) { animation-delay: 0.7s; }
.acs-result-item:nth-child(8) { animation-delay: 0.8s; }
.acs-result-item:nth-child(9) { animation-delay: 0.9s; }
.acs-result-item:nth-child(10) { animation-delay: 1s; }

.acs-result-image {
    flex-shrink: 0;
    width: 120px;
    height: 100px;
    overflow: hidden;
}

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

.acs-result-content {
    flex: 1;
    min-width: 0;
}

.acs-result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 15px;
}

.acs-result-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}
.acs-result-type {
	position:absolute;
	text-transform:capitalize;
	border:1px solid#000;
    padding: 6px 15px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
	bottom:-1px;
	right:-1px;
    transition: all 0.2s ease;	
}
.dark .acs-result-type {
	border:1px solid#252525;
    background: #252525;	
}
.acs-result-item:hover .acs-result-type {
    background: #000;
    color: #fff;
}
.acs-result-excerpt {
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.acs-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
}

.acs-result-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.acs-result-categories {
    font-weight: 500;
}

/* Google Fallback Section */
.acs-google-fallback {
	width:100%;
	float:left;		
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    text-align: center;
	padding:30px;
}

.acs-fallback-header h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 20px;
}

.acs-fallback-content p {
    color: #444;
    margin-bottom: 20px;
    line-height: 1.6;
}

.acs-fallback-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.acs-google-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.acs-button-secondary,
.acs-button-primary {
    background: #000;
    color: white;
}
.acs-button-secondary:hover,
.acs-button-primary:hover {
    background: #000;
    transform: translateY(-2px);
    color: white;	
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Loading Message */
.acs-loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #444;
}

.acs-loading-message p {
    margin-top: 15px;
    font-size: 16px;
}

/* Error Styles */
.acs-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    padding: 20px;
    text-align: center;
}

.acs-error-message {
    color: #c53030;
    margin: 0 0 15px 0;
}

.acs-close-results {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 0px;
    cursor: pointer;
    font-size: 14px;
}

.acs-close-results:hover {
    background: #c53030;
}

/* Cache Indicator */
.acs-cache-indicator {
	width:100%;
	float:left;		
    background: #e6fffa;
	border:1px solid#000;
    padding: 8px 12px;
    margin: -1px 0 0;
    text-align: center;
    font-size: 14px;
    color: #000;
}
/* Search Help */
.acs-search-help {
	width:100%;
	float:left;	
    padding: 0 20px 20px;
}
.acs-search-help p{
    margin: 0 0 15px 0;
	float:left;
	width:100%;
}
.acs-help-content h4 {
    margin: 0 0 15px 0;
    color: #2d3748;
}

.acs-help-content ul {
	width:100%;
	float:left;
    margin: 0;
    padding-left: 15px;
}

.acs-help-content li {
	width:100%;
	float:left;	
    margin: 0 0 5px 0;
    line-height: 1.2;
}

/* Modal Styles */
.acs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.acs-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.acs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
}

.acs-modal-header h3 {
    margin: 0;
    color: #333;
}

.acs-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.acs-modal-body {
    padding: 25px;
}

.acs-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.acs-powered-by {
    color: #999;
}

/* Style Variations */
.acs-style-compact .acs-input-wrapper {
    padding: 4px;
}

.acs-style-compact .acs-search-input {
    padding: 12px 16px;
    font-size: 14px;
}

.acs-style-compact .acs-search-button {
    padding: 12px 18px;
    font-size: 14px;
}

.acs-style-minimal .acs-input-wrapper {
    box-shadow: none;
    border: 1px solid #000;
}

.acs-style-minimal .acs-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.acs-filters {
    display: flex;
    width: 100%;
    float: left;
    margin-top: -1px;
    gap: 0px;
    align-items: center;
}
@media screen and (max-width: 600px) {
.acs-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
}	
}
.acs-filters > * {
    flex: 1;
    min-width: 0; /* Untuk mencegah overflow content */
}
.acs-filters > select {
	margin-left:-1px;
	margin-bottom:-1px;
}
select.acs-post-type-filter {
	margin-left:0px;
}

/* Modern Select Dropdown Style */
.acs-filters > select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 12px 40px 12px 15px;
	margin-bottom: -1px;
    border: 1px solid #000;
    background-color: #fff;
    font-size: 12px;
	font-weight:500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'%23444\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'%3e%3cpolyline points=\'6 9 12 15 18 9\'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.dark .acs-filters > select {
    border: 1px solid #444;
	color:#fff;
    background-color: #222;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'%23444\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'%3e%3cpolyline points=\'6 9 12 15 18 9\'%3e%3c/polyline%3e%3c/svg%3e");
}
/* Hover Effect */
.acs-filters > select:hover {
    border-color: #444;
    background-color: #fdfdfd;
}
.dark .acs-filters > select:hover {
    border-color: #444;
    background-color: #444;
}
.acs-filters > select option {
	position:relative;
	float:left;
	margin-top:-1px;

}
/* Focus Effect */
.acs-filters > select:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(77, 144, 254, 0);
}
.dark .acs-filters > select:focus {
    border-color: #444;
    background-color: #111;	
}

/* Responsive Design */
@media (max-width: 768px) {
    .acs-search-container {
        padding: 15px;
    }
    
    .acs-input-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    .acs-search-button {
        width: 100%;
        justify-content: center;
    }
    
    .acs-result-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .acs-result-image {
        width: 100%;
        height: 150px;
    }
    
    .acs-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .acs-result-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .acs-fallback-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .acs-google-search {
        width: 100%;
        justify-content: center;
        max-width: 250px;
    }
    
    .acs-suggestions-list {
        flex-direction: column;
    }
    
    .acs-query-suggestion {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .acs-search-container {
        padding: 10px;
    }
    
    .acs-search-results {
        padding: 15px;
    }
    
    .acs-result-item {
        padding: 15px;
    }
    
    .acs-google-fallback {
        padding: 20px;
    }
    
    .acs-modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .acs-modal-header,
    .acs-modal-body,
    .acs-modal-footer {
        padding: 15px 20px;
    }
}

/* Print Styles */
@media print {
    .acs-search-container {
        box-shadow: none;
    }
    
    .acs-search-form,
    .acs-google-fallback,
    .acs-modal {
        display: none;
    }
    
    .acs-result-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .acs-search-button {
        background: #000;
        border: 2px solid #000;
    }
    
    .acs-result-item {
        border: 2px solid #000;
    }
    
    .acs-result-title a {
        color: #000;
    }
    
    .acs-result-title a:hover {
        color: #0066cc;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .acs-search-button,
    .acs-result-item,
    .acs-google-search {
        transition: none;
    }
    
    .acs-spinner,
    .acs-loading-spinner {
        animation: none;
    }
    
    .acs-search-button:hover,
    .acs-result-item:hover,
    .acs-google-search:hover {
        transform: none;
    }
}


