/* Autocomplete Styling for embed folder */
.embed-autocomplete-container, .autocomplete-container {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(0, 0, 100, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-height: 250px;
    overflow-y: auto;
    /* Default state - hidden */
    display: none;
}

/* Make sure dropdowns are visible when they should be */
.embed-autocomplete-container[style*="display: block"],
.autocomplete-container[style*="display: block"] {
    display: block !important;
}

/* Fix for dropdown cutoff */
.embed-container,
.embed-form-group,
.embed-input-group {
    overflow: visible !important;
}

/* Item styling */
.embed-autocomplete-item, .autocomplete-item {
    padding: 5.4px 18px; /* Reduced by 10% from 6px */
    border: none;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    font-size: 16px; /* Reduced from 17px */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Remove border from first item */
.embed-autocomplete-container > .autocomplete-item:first-child,
.autocomplete-container > .autocomplete-item:first-child {
    border-bottom: none;
}

.embed-autocomplete-item:hover,
.embed-autocomplete-item.selected,
.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: rgba(100, 75, 209, 0.3);
}

/* Scrollbar styling */
.embed-autocomplete-container::-webkit-scrollbar,
.autocomplete-container::-webkit-scrollbar {
    width: 8px;
}

.embed-autocomplete-container::-webkit-scrollbar-track,
.autocomplete-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.embed-autocomplete-container::-webkit-scrollbar-thumb,
.autocomplete-container::-webkit-scrollbar-thumb {
    background: #5e17eb;
    border-radius: 4px;
}

/* Highlight matching text */
.embed-autocomplete-item strong,
.autocomplete-item strong {
    font-weight: 600;
    color: #00ffff;
}

/* Popular badge styling */
.popular-badge {
    font-size: 11px;
    font-weight: 300;
    color: #5e9eff;
    margin-left: 5px;
    font-style: italic;
    text-transform: capitalize;
}

/* Message item styling */
.embed-autocomplete-item.message-item,
.autocomplete-item.message-item {
    background-color: rgba(0, 0, 255, 0.2);
    color: #a0d0ff;
    text-align: center;
    font-style: italic;
    cursor: default;
    padding: 10px 18px;
    border-bottom: none;
}

.embed-autocomplete-item.message-item:hover,
.embed-autocomplete-item.message-item.selected,
.autocomplete-item.message-item:hover,
.autocomplete-item.message-item.selected {
    background-color: rgba(0, 0, 255, 0.3);
}

.embed-autocomplete-item.message-item i,
.autocomplete-item.message-item i {
    margin-right: 8px;
    color: #5e9eff;
}

/* Loading indicator */
.embed-loading-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    z-index: 10;
    display: none;
    width: 30px;
    height: 30px;
    background-color: rgba(94, 23, 235, 0.2);
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
}

.embed-loading-indicator.active {
    display: block !important;
}

.embed-loading-indicator.active i {
    animation: spin 1s linear infinite;
}

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

/* Fix for input borders and focus borders */
.embed-form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.embed-form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(106, 17, 203, 0.1);
    border-radius: var(--border-radius);
    outline: none;
}

.embed-input-group {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.embed-input-group-text {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

/* Selection highlight effect */
.selection-made {
    animation: selectionPulse 1s ease-in-out;
    border-color: #5e17eb !important;
}

@keyframes selectionPulse {
    0% { box-shadow: 0 0 0 0 rgba(94, 23, 235, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(94, 23, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(94, 23, 235, 0); }
}
