/**
 * Marketplace Link Styles
 * 
 * @package Loraic
 */

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

/* Exclude icons from max-width restrictions */
svg,
i[class*="icon"],
[class*="icon"] svg,
[class*="icon-box"],
.elementor-icon,
.elementor-widget-icon {
    max-width: none !important;
    width: auto !important;
    overflow: visible !important;
}

/* Sticky/Fixed Header */
#pxl-header-main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

#pxl-header-main.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Header Container with clamp */
.pxl-header-modular .pxl-header-container {
    width: clamp(320px, 100%, 1800px);
    max-width: 1800px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

/* Reduce header height */
.pxl-header-modular #pxl-header-main {
    padding: 16px 0;
}

.pxl-header-modular .pxl-header-sections {
    min-height: 50px;
}

.pxl-header-modular .pxl-header-branding img {
    max-height: 40px;
    width: auto;
}

/* Three-section layout */
.pxl-header-modular .pxl-header-sections {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}
.pxl-header-modular .pxl-header-left { justify-self: start; }
.pxl-header-modular .pxl-header-center { justify-self: center; text-align: center; }
.pxl-header-modular .pxl-header-right { justify-self: end; }
.pxl-header-modular .pxl-header-buttons { display: inline-flex; align-items: center; gap: 16px; }

/* Put marketplace in the same row with menu */
.pxl-header-modular .pxl-header-center {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.pxl-header-modular .pxl-header-center .pxl-menu-primary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    list-style: none;
}
.pxl-header-modular .pxl-header-center .pxl-menu-primary > li {
    margin: 0 !important;
    padding: 0;
}

/* Override any default margins on menu items */
.pxl-header-modular .pxl-menu-primary > li {
    margin: 0 !important;
}
.pxl-header-modular .pxl-header-center .pxl-menu-primary > li > a {
    padding: 6px 12px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    color: #222 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}
.pxl-header-modular .pxl-header-center .pxl-menu-primary > li > a:hover,
.pxl-header-modular .pxl-header-center .pxl-menu-primary > li > a:focus {
    color: #000 !important;
    background-color: transparent !important;
}
.pxl-header-modular .pxl-header-center .pxl-menu-primary > li > a > span {
    font-size: 16px;
    font-weight: 500;
}
.pxl-header-modular .pxl-header-center .pxl-marketplace-link { 
    margin: 0;
}

/* Marketplace Link Container */
.pxl-marketplace-link {
    display: inline-block;
    margin: 0;
}

/* Marketplace Button – animated gradient (blue -> green) */
.pxl-marketplace-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    /* Simple two-color gradient for smoother motion */
    background: linear-gradient(270deg, #1e90ff, #00c853) !important;
    background-size: 200% 200%;
    animation: pxlGradientShift 5s linear infinite;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    white-space: nowrap;
    line-height: 1.4;
    border: none;
    will-change: background-position;
}

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

.pxl-marketplace-btn:hover,
.pxl-marketplace-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.25);
    color: #ffffff !important;
}

.pxl-marketplace-btn:active {
    transform: translateY(0);
}

/* Marketplace Text */
.marketplace-text {
    line-height: 1;
}

/* Responsive */
@media (max-width: 1199px) {
    .pxl-marketplace-link {
        margin: 10px 0;
    }
    
    .pxl-marketplace-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Variants removed - using gradient only */

/* Login Buttons */
.pxl-login-buttons {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.pxl-btn-login,
.pxl-btn-signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 90px;
    line-height: 1.4;
}

.pxl-btn-login {
    color: #222 !important;
    background-color: transparent !important;
    border: 2px solid #222;
}

.pxl-btn-login:hover {
    background-color: #222 !important;
    color: #ffffff !important;
    border-color: #222 !important;
}

.pxl-btn-signup {
    background-color: #222 !important;
    color: #ffffff !important;
    border: 2px solid #222;
}

.pxl-btn-signup:hover {
    background-color: #000 !important;
    color: #ffffff !important;
    border-color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Language switcher – compact with icon */
.pxl-language-switcher {
    position: relative;
    z-index: 9999;
    overflow: visible;
}

.pxl-lang-dropdown {
    position: relative;
}

.pxl-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.pxl-lang-trigger .pxl-lang-icon,
.pxl-lang-trigger .pxl-lang-flag {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    overflow: visible !important;
}

.pxl-lang-trigger:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.pxl-lang-trigger:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.pxl-lang-icon {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
    width: auto;
    height: auto;
    max-width: none !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.pxl-lang-arrow {
    color: #6b7280;
    transition: transform 0.2s ease;
}

.pxl-lang-dropdown.active .pxl-lang-arrow {
    transform: rotate(180deg);
}

.pxl-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

.pxl-lang-dropdown.active .pxl-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.pxl-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.pxl-lang-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.pxl-lang-flag {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
    width: auto;
    height: auto;
    max-width: none !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.pxl-lang-name {
    font-weight: 500;
}

/* Hide default Polylang select */
.pxl-language-switcher select,
.pxl-language-switcher .pll-switcher-select {
    display: none !important;
}

/* Elementor h2 size override */
/* .elementor-kit-7 h2 {
    font-size: 60px !important;
} */

.pxl-header-modular .pxl-nav-mobile,
.pxl-header-modular .pxl-header-menu,
.pxl-header-modular .pxl-header-menu-backdrop {
    display: none;
}

/* Hide mobile header buttons on desktop */
.pxl-mobile-header-buttons {
    display: none;
}

@media (max-width: 1199px) {
    /* Prevent horizontal scroll on mobile */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Hide desktop header sections on mobile */
    .pxl-header-modular .pxl-header-sections {
        display: none !important;
    }
    
    /* Mobile header padding to show logo */
    .pxl-header-modular #pxl-header-main {
        padding: 12px 20px !important;
        max-width: 100vw;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    
    /* Ensure logo is visible on mobile - left side */
    .pxl-header-modular .pxl-header-branding {
        display: flex !important;
        align-items: center;
        padding: 0;
        flex-shrink: 0;
        order: 1;
    }
    
    .pxl-header-modular .pxl-header-branding img {
        max-height: 40px;
        width: auto;
    }
    
    /* Mobile header buttons container - center/right, between logo and menu */
    .pxl-mobile-header-buttons {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
        order: 2;
        margin-left: auto;
        margin-right: 12px;
    }
    
    /* Mobile Get Started button - compact for mobile UX */
    .pxl-mobile-btn-get-started {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 7px 14px;
        background-color: #222 !important;
        color: #ffffff !important;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        text-decoration: none;
        border-radius: 6px;
        white-space: nowrap;
        line-height: 1.3;
        border: none;
        transition: all 0.3s ease;
    }
    
    .pxl-mobile-btn-get-started:hover {
        background-color: #000 !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* Mobile Marketplace button - compact for mobile UX */
    .pxl-mobile-btn-marketplace {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 7px 14px;
        background: linear-gradient(270deg, #1e90ff, #00c853) !important;
        background-size: 200% 200%;
        animation: pxlGradientShift 5s linear infinite;
        color: #ffffff !important;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        text-decoration: none;
        border-radius: 6px;
        white-space: nowrap;
        line-height: 1.3;
        border: none;
        transition: all 0.3s ease;
    }
    
    .pxl-mobile-btn-marketplace:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(30, 144, 255, 0.3);
    }
    
    /* Ensure burger menu is visible - right side */
    .pxl-header-modular #pxl-nav-mobile {
        flex-shrink: 0;
        order: 3;
    }
    
    /* Show mobile menu elements */
    .pxl-header-modular .pxl-nav-mobile {
        display: block;
    }
    .pxl-header-modular .pxl-header-menu,
    .pxl-header-modular .pxl-header-menu-backdrop {
        display: block;
    }
    
    /* Prevent mobile menu from causing horizontal scroll */
    .pxl-header-modular .pxl-header-menu {
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .pxl-header-modular .pxl-header-menu-scroll {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Burger to X transformation when menu is active */
    .pxl-header-modular #pxl-nav-mobile.active .pxl-nav-mobile-button span {
        opacity: 0;
    }
    .pxl-header-modular #pxl-nav-mobile.active .pxl-nav-mobile-button:before {
        top: 9px;
        transform: rotate(45deg);
        width: 100%;
    }
    .pxl-header-modular #pxl-nav-mobile.active .pxl-nav-mobile-button:after {
        bottom: 9px;
        transform: rotate(-45deg);
        width: 100%;
    }
    
    /* Logo in mobile menu - ensure visibility */
    .pxl-header-menu .pxl-logo-mobile {
        padding: 0px;
        margin-bottom: 20px;
    }
    
    .pxl-header-menu .pxl-logo-mobile img {
        max-height: 40px;
        width: auto;
    }
    
    /* Marketplace button in mobile menu */
    .pxl-header-menu .pxl-mobile-marketplace {
        margin: 20px 0;
        padding: 0 35px;
        display: flex;
        justify-content: flex-start;
    }
    
    .pxl-header-menu .pxl-mobile-marketplace .pxl-marketplace-btn {
        width: auto;
        display: inline-flex;
        justify-content: center;
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Extra small screens - adjust button sizes */
@media (max-width: 480px) {
    .pxl-mobile-header-buttons {
        gap: 6px;
    }
    
    .pxl-mobile-btn-get-started,
    .pxl-mobile-btn-marketplace {
        padding: 7px 12px;
        font-size: 11px;
    }
}

@media screen and (max-width: 1200px) {
    .pxl-header-menu-scroll {
        padding: 100px 35px;
    }
}
