/* ===== HEADER DINÂMICO DE MOEDAS ===== */

/* Reset global para o header */
.dynamic-currency-header * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Container principal do header */
.dynamic-currency-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    height: 80px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Ajustes do body */
body { 
    padding-top: 80px !important; 
}

/* Ajustes para barra admin do WordPress */
body.admin-bar { 
    padding-top: 112px !important; 
}

body.admin-bar .dynamic-currency-header {
    top: 32px;
}

/* Container interno do header */
.dynamic-currency-header > div {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo dinâmico */
#dynamic-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

#currency-logo-container img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#currency-logo-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#currency-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
    transition: color 0.3s ease;
}

/* Menu de navegação central */
.currency-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-currency-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.nav-currency-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.nav-currency-item.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    color: #16a34a;
    border-color: #22c55e;
    font-weight: 600;
}

.nav-currency-item.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: #22c55e;
    border-radius: 1px;
}

.nav-currency-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Menu mobile */
.mobile-menu-container {
    position: relative;
    display: none;
}

#mobile-currency-menu {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    transition: all 0.3s ease;
}

#mobile-currency-menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

#mobile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 250px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
    padding: 15px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #1e293b;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.mobile-nav-item:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.mobile-nav-item span:first-child {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Animações do dropdown mobile */
.mobile-menu-container.active #mobile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-container.active #mobile-currency-menu svg {
    transform: rotate(180deg);
}

/* Responsividade */
@media (max-width: 992px) {
    .currency-nav {
        display: none;
    }
    
    .mobile-menu-container {
        display: block;
    }
}

@media (max-width: 640px) {
    .dynamic-currency-header > div {
        padding: 0 15px;
    }
    
    #currency-title {
        font-size: 16px;
    }
    
    #dynamic-logo {
        min-width: auto;
        gap: 10px;
    }
    
    #currency-logo-container img {
        width: 40px;
        height: 40px;
    }
}

/* Animação de entrada */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dynamic-currency-header {
    animation: fadeInDown 0.5s ease-out;
}

/* Efeitos de hover melhorados */
.nav-currency-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 8px;
    left: 50%;
    background: #3b82f6;
    transition: all 0.3s ease;
}

.nav-currency-item:hover::after {
    width: 80%;
    left: 10%;
}

.nav-currency-item.active::after {
    background: #22c55e;
    width: 80%;
    left: 10%;
}

/* Estados de carregamento */
.logo-loading {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
    background-size: 200% 200%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dynamic-currency-header {
        background: rgba(30, 41, 59, 0.95);
        border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    #currency-title {
        color: #f1f5f9;
    }
    
    .nav-currency-item {
        color: #94a3b8;
    }
    
    .nav-currency-item:hover {
        background: rgba(51, 65, 85, 0.5);
        color: #e2e8f0;
    }
    
    #mobile-dropdown {
        background: rgba(30, 41, 59, 0.98);
        border: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .mobile-nav-item {
        color: #e2e8f0;
    }
    
    .mobile-nav-item:hover {
        background: rgba(51, 65, 85, 0.5);
    }
} 