/* Emoji Kitchen Styles */
.emoji-display {
    min-height: 60px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    font-size: 2rem;
    transition: all 0.3s ease;
}

/* Selected Emoji Container */
.selected-emoji-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 10px;
    animation: emojiSelect 0.5s ease-in-out;
}

.selected-emoji-text {
    font-size: 2.5rem;
    margin-right: 10px;
}

.copy-emoji-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-emoji-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.copy-emoji-btn.copied {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.copy-emoji-btn.copied::after {
    content: " ✓";
    font-weight: bold;
}

.emoji-display:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.emoji-display.has-emoji {
    border-color: #28a745;
    background: #d4edda;
}

.emoji-result-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    max-width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 3px solid #007bff;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.emoji-result-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.emoji-result {
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    border-radius: 18px;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    animation: emojiFloat 3s ease-in-out infinite;
    z-index: 1;
    position: relative;
}

@keyframes emojiFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.emoji-item:hover {
    border-color: #007bff;
    background: #e3f2fd;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.emoji-item.selected {
    border-color: #28a745;
    background: #d4edda;
    transform: scale(1.1);
}

.popular-combination {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    margin: 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.popular-combination:hover {
    border-color: #007bff;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,123,255,0.2);
}

.popular-combination .emoji-pair {
    font-size: 3rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.popular-combination .combination-name {
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

.popular-combination .combination-desc {
    font-size: 0.9rem;
    color: #6c757d;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.emoji-category {
    margin-bottom: 20px;
}

.emoji-category h6 {
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.emoji-search-results {
    max-height: 300px;
    overflow-y: auto;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .selected-emoji-container {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }
    
    .selected-emoji-text {
        font-size: 2rem;
        margin-right: 0;
    }
    
    .copy-emoji-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .emoji-result {
        font-size: 5rem;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 8px;
    }
    
    .emoji-item {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .popular-combination .emoji-pair {
        font-size: 2rem;
    }
    
    .popular-combination {
        margin: 5px;
        padding: 15px;
    }
    
    .popular-combination .combination-name {
        font-size: 0.9rem;
    }
    
    .popular-combination .combination-desc {
        font-size: 0.8rem;
    }
    
    #popularCombinations {
        margin: 0 -5px;
    }
    
    #popularCombinations .row {
        margin: 0;
    }
}

@media (max-width: 576px) {
    .selected-emoji-container {
        padding: 6px;
        gap: 6px;
    }
    
    .selected-emoji-text {
        font-size: 1.8rem;
    }
    
    .copy-emoji-btn {
        font-size: 0.6rem;
        padding: 3px 6px;
    }
    
    .emoji-result {
        font-size: 4rem;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        gap: 5px;
    }
    
    .emoji-item {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .popular-combination {
        margin: 3px;
        padding: 10px;
    }
    
    .popular-combination .emoji-pair {
        font-size: 1.5rem;
        gap: 5px;
    }
    
    .popular-combination .combination-name {
        font-size: 0.8rem;
    }
    
    .popular-combination .combination-desc {
        font-size: 0.7rem;
    }
    
    #popularCombinations {
        margin: 0 -3px;
    }
    
    #popularCombinations .row {
        margin: 0;
    }
    
    .popular-combination {
        min-height: 100px;
    }

    .emoji-result-container {
        min-height: 120px;
        padding: 5px;
    }
    .emoji-result {
        max-height: 100px;
    }
}

/* Animation for emoji selection */
.emoji-selection-animation {
    animation: emojiSelect 0.5s ease-out;
}

@keyframes emojiSelect {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Success animation for generation */
.generation-success {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tooltip styles */
.emoji-tooltip {
    position: relative;
    display: inline-block;
}

.emoji-tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

.emoji-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Custom scrollbar for emoji grid */
.emoji-grid::-webkit-scrollbar {
    width: 8px;
}

.emoji-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.emoji-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.emoji-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 

/* Fix z-index cho modal và backdrop để modal luôn nằm trên */
.modal-backdrop {
    z-index: 1040 !important;
}
.modal.show, .modal.fade.show {
    z-index: 1050 !important;
}
.modal-dialog {
    z-index: 1060 !important;
} 