/* Estilos personalizados para PixeeHub Child Theme */

/* Banner "Add Stickers" com gradiente azul */
.section-title-center {
    line-height: 1.2;
}

.pixeehub-gradient-text {
    background: linear-gradient(135deg, #007cf0 0%, #00dfd8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback for browsers that don't support gradient text */
    font-weight: bold;
    font-size: 1.3em;
    display: inline-block;
}

/* Animação fadeIn para o texto */
.fadeIn {
    animation: fadeInText 0.8s ease-in-out forwards;
    opacity: 0;
}

.fadeIn:nth-child(1) { animation-delay: 0.1s; }
.fadeIn:nth-child(2) { animation-delay: 0.2s; }
.fadeIn:nth-child(3) { animation-delay: 0.3s; }
.fadeIn:nth-child(4) { animation-delay: 0.4s; }
.fadeIn:nth-child(5) { animation-delay: 0.5s; }
.fadeIn:nth-child(6) { animation-delay: 0.6s; }
.fadeIn:nth-child(7) { animation-delay: 0.7s; }
.fadeIn:nth-child(8) { animation-delay: 0.8s; }
.fadeIn:nth-child(9) { animation-delay: 0.9s; }
.fadeIn:nth-child(10) { animation-delay: 1.0s; }
.fadeIn:nth-child(11) { animation-delay: 1.1s; }

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias simples para hero sections */
.pixeehub-main-hero,
.pixeehub-stickers-section {
    position: relative;
}

/* Modern Avatar Dropdown Styles */
.avatar-dropdown-container {
    position: relative;
    width: 100%;
}

.avatar-dropdown {
    position: relative;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 48px;
    gap: 12px;
}

.dropdown-trigger:hover {
    border-color: #9ca3af;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.avatar-dropdown.open .dropdown-trigger {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dropdown-trigger img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.dropdown-trigger span {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.dropdown-arrow {
    color: #6b7280;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.avatar-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.avatar-dropdown .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 4px;
}

.avatar-dropdown.open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 12px;
    border-bottom: 1px solid #f3f4f6;
}

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

.dropdown-item:hover {
    background: #f8fafc;
}

.dropdown-item.selected {
    background: #eff6ff;
    color: #1e40af;
}

.dropdown-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.dropdown-item.selected img {
    border-color: #3b82f6;
}

.dropdown-item span {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.check-icon {
    color: #3b82f6;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.dropdown-item.selected .check-icon {
    opacity: 1;
}

.selected-animation {
    animation: avatarSelected 0.3s ease;
}

@keyframes avatarSelected {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 480px) {
    .dropdown-content {
        max-height: 240px;
    }
    
    .dropdown-item {
        padding: 10px 14px;
    }
    
    .dropdown-trigger {
        padding: 10px 14px;
    }
}

/* Header Avatar Styles */
.pixeehub-avatar {
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #e9ecef !important;
    transition: all 0.3s ease !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

.pixeehub-avatar:hover {
    border-color: #007cf0 !important;
    transform: scale(1.05) !important;
}

/* Prevent duplicate avatars */
.pixeehub-avatar[data-pixeehub-processed="true"] + .pixeehub-avatar {
    display: none !important;
}

/* Prevent multiple avatars in same container */
.user-avatar-toggle img:nth-child(n+2) {
    display: none !important;
}

/* Header specific avatar positioning */
.pixeehub-header .user-avatar-toggle {
    position: relative !important;
    z-index: 999 !important;
    overflow: hidden !important;
}

.pixeehub-header .user-avatar-toggle img {
    position: relative !important;
    z-index: 1000 !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Ensure dropdown appears above everything */
.pixeehub-header .user-dropdown {
    z-index: 1000000 !important;
    isolation: isolate !important;
}

.pixeehub-header .user-dropdown.visible {
    z-index: 1000001 !important;
}

/* Mobile dropdown specific fixes */
@media (max-width: 768px) {
    .pixeehub-header .user-dropdown.visible {
        z-index: 1000002 !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 280px !important;
        height: 100vh !important;
    }
}

/* Nuclear option - ensure dropdown is always on top */
.pixeehub-header .user-dropdown.visible {
    z-index: 2147483647 !important; /* Maximum z-index value */
}

/* Fixed positioning approach - dropdowns escape any container clipping */
.pixeehub-header .user-dropdown.visible {
    position: fixed !important;
    z-index: 2147483647 !important;
}

.pixeehub-header .submenu {
    position: fixed !important;
    z-index: 2147483646 !important;
}

/* Prevent any accidental overlapping elements */
.pixeehub-header .user-dropdown-container {
    position: relative !important;
    z-index: 999998 !important;
}

/* Debug helper - remove duplicate avatars that might appear due to theme conflicts */
.pixeehub-header .user-avatar-toggle {
    position: relative !important;
}

.pixeehub-header .user-avatar-toggle > img:not(:first-child) {
    display: none !important;
}

/* Profile Avatar Styles */
.current-avatar img {
    border: 3px solid #007cf0 !important;
    object-fit: cover !important;
}

/* Search Results Page Fixes */
.pixeehub-search-results {
    box-sizing: border-box !important;
}

.search-results-container {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1385px !important;
}

.search-results-main {
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.search-results-grid {
    box-sizing: border-box !important;
    display: grid !important;
    width: 100% !important;
}

.search-result-item {
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Ensure proper grid layout */
@media (min-width: 1025px) {
    .search-results-container {
        display: grid !important;
        grid-template-columns: 280px 1fr !important;
        gap: 40px !important;
    }
    
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    }
}

/* Responsive grid fixes */
@media (max-width: 1200px) and (min-width: 1025px) {
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    }
}

@media (max-width: 1024px) {
    .search-results-container {
        grid-template-columns: 1fr !important;
    }
    
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 480px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}