/* Emoji Search Plugin Styles */
.emoji-search-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Search Input */
.emoji-search-input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.emoji-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.emoji-search-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.emoji-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.emoji-search-clear:hover {
    background-color: #f0f0f0;
}

/* Result Count */
.emoji-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
}

/* Category Buttons */
.emoji-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.category-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: #333;
}

.category-btn:hover {
    background: #0a345e;
    border-color: #ced4da;
}

.category-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Results Container */
.emoji-results {
    min-height: 200px;
    margin-bottom: 20px;
}

.emoji-results.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.emoji-results.list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Emoji Items */
.emoji-item {
    background: white;
    border: 2px solid #f1f3f4;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.emoji-item:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
    transform: translateY(-2px);
}

.emoji-item.copied {
    background: #d4edda;
    border-color: #c3e6cb;
    animation: pulse 0.6s ease;
}

.emoji-char {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
    line-height: 1;
    color: #333;
}

.emoji-info {
    font-size: 12px;
}

.emoji-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.emoji-tags {
    color: #666;
    font-size: 11px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* List layout styles */
.emoji-results.list .emoji-item {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 12px 16px;
}

.emoji-results.list .emoji-char {
    font-size: 24px;
    margin-right: 16px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.emoji-results.list .emoji-info {
    flex-grow: 1;
}

.emoji-results.list .emoji-name {
    margin-bottom: 2px;
}

/* Loading States */
.emoji-loading,
.emoji-error,
.emoji-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.emoji-loading {
    position: relative;
}

.emoji-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    left: 50%;
    transform: translateX(-50%);
    top: 60px;
}

.emoji-error {
    color: #dc3545;
}

.emoji-no-results {
    color: #6c757d;
}

/* Load More Button */
.emoji-load-more-wrapper {
    text-align: center;
}

.emoji-load-more {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.emoji-load-more:hover {
    background: #005a87;
}

.emoji-load-more:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Animations */
@keyframes spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .emoji-results.grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .emoji-item {
        padding: 12px;
    }
    
    .emoji-char {
        font-size: 28px;
    }
    
    .category-btn {
        padding: 6px 12px;
        font-size: 13px;

    }
    
    .emoji-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}


@media (max-width: 480px) {
    .emoji-results.grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .emoji-categories {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }
    
    .category-btn {
        flex-shrink: 0;
    }
}


/* Popular Terms Styling */
.emoji-popular-terms {
    margin: 10px 0 15px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e1e1e1;
}

.popular-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-right: 8px;
}

.popular-term-btn {
    display: inline-block;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 7px;
    padding: 4px 12px;
    margin: 2px 4px 2px 0;
    font-size: 12px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.popular-term-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #343a40;
    transform: translateY(-1px);
}

.popular-term-btn:active,
.popular-term-btn.clicked {
    background: #007cba;
    border-color: #007cba;
    color: white;
    transform: translateY(0);
}

.popular-term-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Remove the old emoji-count styling since we're removing it */
.emoji-count {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .emoji-popular-terms {
        padding: 6px 0;
    }
    
    .popular-term-btn {
        font-size: 11px;
        padding: 3px 10px;
        margin: 1px 3px 1px 0;
    }
    
    .popular-label {
        font-size: 12px;
        display: block;
        margin-bottom: 4px;
    }
}

.emoji-copy-popup {
    position: absolute;
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0.9;
    transform: translateX(-50%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

.emoji-copy-popup.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
}
