/**
 * Inspiro Header Builder - Component Styles
 * Loaded on frontend and preview for component-specific styling
 */

/* ===== LOGO COMPONENT ===== */
.ihb-component-logo {
    display: flex;
    align-items: center;
}

.ihb-component-logo .navbar-header {
    margin: 0;
}

.ihb-component-logo .navbar-brand-wpz {
    line-height: 1.4;
}

.ihb-component-logo .tagline {
    display: block;
    font-size: 0.8em;
    opacity: 0.8;
    font-weight: normal;
    margin-top: 2px;
    line-height: 1.2;
}

/* ===== MENU COMPONENT ===== */
.ihb-component-menu ul.navbar-nav {
    padding: 0 0;
}

/* ===== SEARCH COMPONENT ===== */
.ihb-component-search {
    display: flex;
    align-items: center;
}

.ihb-component-search .sb-search {
    margin: 0;
    display: block !important;
}

/* ===== SOCIAL COMPONENT ===== */
.ihb-component-social {
    display: flex;
    align-items: center;
}

.ihb-component-social .header_social {
    margin: 0;
}

.ihb-component-social .social-profiles {
    display: flex;
    align-items: center;
    margin: 0;
}

.ihb-component-social .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    }
    
    .ihb-component-social .social-link:hover {
        transform: scale(1.1);
}

.ihb-component-social .social-link svg {
    display: block;
}
/* Brand colors for social icons */
.social-original-color.social-facebook {
    color: #1877F2;
}

.social-original-color.social-twitter {
    color: #000000;
}

.social-original-color.social-instagram {
    color: #E4405F;
}

.social-original-color.social-linkedin {
    color: #0A66C2;
}

.social-original-color.social-youtube {
    color: #FF0000;
}

.social-original-color.social-vimeo {
    color: #1AB7EA;
}

.social-original-color.social-whatsapp {
    color: #25D366;
}

.social-original-color.social-email {
    color: #7f7f7f;
}

.social-original-color {
    color: #7f7f7f;
}
/* ===== CART COMPONENT ===== */
.ihb-component-cart {
    display: flex;
    align-items: center;
}

.ihb-component-cart .wpz_cart {
    margin: 0;
    display: flex !important; /* Override any theme hiding rules */
}

/* Force cart to be visible in header builder */
body.inspiro-header-builder-enabled .ihb-component-cart .wpz_cart {
    display: flex !important;
}

/* ===== HAMBURGER COMPONENT ===== */
.ihb-component-hamburger {
    display: flex;
    align-items: center;
}

.ihb-component-hamburger .navbar-toggle {
    margin: 0;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.ihb-component-hamburger .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background-color: #fff;
    margin: 4px 0;
}

/* ===== LOGIN/LOGOUT COMPONENT ===== */
.ihb-component-login-logout {
    display: flex;
    align-items: center;
}

.ihb-component-login-logout .login-logout-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Logged in state - with avatar */
.ihb-component-login-logout.logged-in.with-avatar .login-logout-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ihb-component-login-logout.logged-in.with-avatar .user-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.ihb-component-login-logout.logged-in.with-avatar .user-icon img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.ihb-component-login-logout.logged-in.with-avatar .user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

/* Logged in state - without avatar */
.ihb-component-login-logout.logged-in.no-avatar .login-logout-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ihb-component-login-logout.logged-in.no-avatar .user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.ihb-component-login-logout.logged-in .user-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}
.ihb-component-login-logout.logged-in .user-name a {
    text-decoration: none;
}

.ihb-component-login-logout.logged-in .user-name a:hover {
    opacity: 0.8;
}

.ihb-component-login-logout.logged-in .logout-link {
    font-size: 12px;
    line-height: 1.2;
    opacity: 0.8;
}

.ihb-component-login-logout.logged-in .logout-link a {
    text-decoration: none;
}

.ihb-component-login-logout.logged-in .logout-link a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Add separator for no-avatar layout */
.ihb-component-login-logout.logged-in.no-avatar .logout-link:before {
    content: "/";
    margin-right: 6px;
    opacity: 0.6;
}

/* Logged out state */
.ihb-component-login-logout.logged-out .login-logout-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ihb-component-login-logout.logged-out .login-link,
.ihb-component-login-logout.logged-out .register-link {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
}

.ihb-component-login-logout.logged-out .login-link:hover,
.ihb-component-login-logout.logged-out .register-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.ihb-component-login-logout.logged-out .login-separator {
    opacity: 0.6;
    font-size: 14px;
}

/* ===== CUSTOM HTML COMPONENT ===== */
.ihb-component-custom-html {
    display: flex;
    align-items: center;
}

.ihb-component-custom-html .custom-html-content {
    width: 100%;
    line-height: 1.4;
}

.ihb-component-custom-html .custom-html-content p {
    margin: 0;
    padding: 0;
}

.ihb-component-custom-html .custom-html-content a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.ihb-component-custom-html .custom-html-content a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* ===== BUTTON COMPONENT ===== */
.ihb-component-button {
    display: flex;
    align-items: center;
}

.navbar a.ihb-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.4;
    cursor: pointer;
    font-family: inherit;
    /* Allow inline CSS variables to control colors */
    color: var(--ihb-text-color, currentColor);
    background-color: var(--ihb-bg-color, transparent);
}

.navbar a.ihb-button:hover {
    text-decoration: none;
    transform: translateY(-1px);
    /* Apply hover variables if provided */
    color: var(--ihb-text-color-hover, inherit);
    background-color: var(--ihb-bg-color-hover, inherit);
}

.ihb-button-primary {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}

.ihb-button-primary:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: #ffffff;
}

.ihb-button-secondary {
    background-color: #f1f1f1;
    color: #333333;
    border-color: #ddd;
}

.ihb-button-secondary:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
    color: #333333;
}

.ihb-button-outline {
    background-color: transparent;
    color: #0073aa;
    border-color: #0073aa;
}

.ihb-button-outline:hover {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    /* Login/Logout mobile adjustments */
    .ihb-component-login-logout.logged-in .user-icon img {
        width: 28px;
        height: 28px;
    }

    .ihb-component-login-logout.logged-in .user-name {
        font-size: 13px;
    }

    .ihb-component-login-logout.logged-in .logout-link {
        font-size: 11px;
    }

    .ihb-component-login-logout.logged-out .login-link,
    .ihb-component-login-logout.logged-out .register-link {
        font-size: 13px;
    }



    /* Button component mobile adjustments */
    .ihb-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Logo mobile adjustments */
    .ihb-component-logo .tagline {
        display: none;
    }
}
