/* css/layout/brand-header.css */
/* Brand-specific header, footer, and members header styles */

/* =================================================================
   1. BRAND PUBLIC HEADER (Landing page at /brands)
   ================================================================= */
.brand-header {
    background-color: var(--color-white);
    height: 72px;
    border-bottom: 1px solid var(--color-gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.brand-header__container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Logo */
.brand-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-header__logo img {
    height: 32px;
    width: auto;
    transition: opacity 0.2s ease;
}

.brand-header__logo a:hover img {
    opacity: 0.8;
}

/* Navigation — margin-left: auto pushes nav+CTA to the right (matches homepage header) */
.brand-header__nav {
    display: flex;
    height: 100%;
    align-items: center;
    margin-left: auto;
}

.brand-header__nav ul {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.brand-header__nav li {
    position: relative;
    display: flex;
    align-items: center;
}

.brand-header__nav a:not(.button) {
    color: var(--color-gray-600);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 0;
    display: inline-block;
}

.brand-header__nav a:not(.button):hover {
    color: var(--color-primary);
}

/* "For Creators" link — green accent (mirrors "For Brands" on creator footer) */
.brand-header__nav .brand-header__creators-link {
    color: var(--color-success);
    font-weight: 600;
}

.brand-header__nav .brand-header__creators-link:hover {
    color: var(--color-success-dark);
}

/* CTA Area (right side) — 32px left margin matches nav link gap spacing */
.brand-header__cta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-left: 32px;
}

.brand-header__login-link {
    color: var(--color-gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 0;
    transition: color 0.2s ease;
}

.brand-header__login-link:hover {
    color: var(--color-primary);
}

.brand-header__start-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.brand-header__start-btn:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.brand-header__dashboard-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 0;
    transition: color 0.2s ease;
}

.brand-header__dashboard-link:hover {
    color: var(--color-primary-dark);
}

/* Hamburger Toggle (Mobile) */
.brand-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    align-items: flex-end;
    z-index: 1100;
    margin-left: 8px;
}

.brand-header__toggle span {
    display: block;
    height: 2px;
    background-color: var(--color-gray-800);
    border-radius: 99px;
    transition: all 0.2s ease-in-out;
}

.brand-header__toggle span:nth-child(1) { width: 22px; }
.brand-header__toggle span:nth-child(2) { width: 22px; }
.brand-header__toggle span:nth-child(3) { width: 14px; }

.brand-header__toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    width: 22px;
}
.brand-header__toggle.active span:nth-child(2) {
    opacity: 0;
}
.brand-header__toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    width: 22px;
}

/* =================================================================
   2. BRAND PUBLIC HEADER — MOBILE
   ================================================================= */
@media (max-width: 991px) {
    .brand-header {
        position: fixed;
    }

    .brand-header__toggle {
        display: flex;
    }

    .brand-header__logo img {
        height: 24px;
    }

    .brand-header__nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        border-bottom: 1px solid var(--color-gray-200);
        box-shadow: 0 4px 10px -5px rgba(15, 23, 42, 0.1);
        flex-direction: column;
        padding: var(--space-4) var(--space-6);
        align-items: stretch;
    }

    .brand-header__nav.active {
        display: flex;
    }

    .brand-header__nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .brand-header__nav a:not(.button) {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--color-gray-100);
        font-size: 1rem;
        min-height: 44px;
    }

    /* Show CTA in mobile menu */
    .brand-header__cta {
        display: none;
    }

    .brand-header__nav .brand-header__mobile-cta {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-top: var(--space-4);
        border-top: 1px solid var(--color-gray-200);
        margin-top: var(--space-2);
    }

    .brand-header__nav .brand-header__mobile-cta .brand-header__start-btn {
        justify-content: center;
        width: 100%;
        height: 48px;
        font-size: 1rem;
    }

    .brand-header__nav .brand-header__mobile-cta .brand-header__login-link {
        text-align: center;
        display: block;
        padding: 12px 0;
        font-size: 1rem;
    }
}

/* Hide mobile CTA items on desktop */
@media (min-width: 992px) {
    .brand-header__mobile-cta {
        display: none;
    }
}

@media (max-width: 480px) {
    .brand-header__container {
        padding: 0 var(--space-4);
    }
}

/* =================================================================
   3. BRAND FOOTER (Public brand pages)
   ================================================================= */
.brand-footer {
    background-color: var(--color-gray-50);
    padding: var(--space-12) 0 var(--space-6);
    border-top: 1px solid var(--color-gray-200);
}

.brand-footer__top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.brand-footer__brand {
    max-width: 300px;
}

.brand-footer__logo {
    margin-bottom: var(--space-4);
}

.brand-footer__logo img {
    transition: opacity 0.2s ease;
}

.brand-footer__logo:hover img {
    opacity: 0.9;
}

.brand-footer__tagline {
    color: var(--color-gray-600);
    line-height: var(--line-height-loose);
}

/* Reuse the same link column pattern from the creator footer */
.brand-footer__links h4 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-4);
    color: var(--color-gray-900);
    position: relative;
    display: inline-block;
}

.brand-footer__links h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: 99px;
}

.brand-footer__links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.brand-footer__links a {
    color: var(--color-gray-600);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    padding: var(--space-1) 0;
    position: relative;
}

.brand-footer__links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.2s ease;
}

.brand-footer__links a:hover {
    color: var(--color-primary);
    text-decoration: none;
    transform: translateX(3px);
}

.brand-footer__links a:hover::after {
    width: 100%;
}

/* "For Creators" link — indigo accent to stand out from other links */
.brand-footer__links .brand-footer__creators-link {
    color: var(--color-primary);
    font-weight: 600;
}

.brand-footer__links .brand-footer__creators-link:hover {
    color: var(--color-primary-dark);
}

.brand-footer__bottom {
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-gray-200);
    text-align: center;
}

.brand-footer__copyright {
    color: var(--color-gray-500);
    font-size: var(--font-size-sm);
}

/* Brand Footer Responsive */
@media (max-width: 991px) {
    .brand-footer__top {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }

    .brand-footer__brand {
        grid-column: span 2;
        max-width: 100%;
        text-align: center;
        margin: 0 auto;
    }

    .brand-footer__logo {
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .brand-footer {
        padding: var(--space-8) 0 var(--space-4);
    }

    .brand-footer__top {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .brand-footer__brand {
        grid-column: span 1;
    }

    .brand-footer__links {
        text-align: center;
    }

    .brand-footer__links h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .brand-footer__links ul {
        align-items: center;
    }

    .brand-footer__links a:hover {
        transform: translateY(-2px);
    }
}

/* =================================================================
   4. BRAND MEMBERS HEADER (Dashboard, Campaign View)
   Simplified: Logo (left) + User dropdown + mobile toggle (right)
   Navigation now lives in brand-sidebar.css
   ================================================================= */
.brand-members-header {
    background-color: var(--color-white);
    height: 64px;
    border-bottom: 1px solid var(--color-gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.brand-members-header__container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
}

.brand-members-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-members-header__logo img {
    height: 28px;
    width: auto;
    transition: opacity 0.2s ease;
}

.brand-members-header__logo:hover img {
    opacity: 0.8;
}

/* Right side: Dropdown + Toggle */
.brand-members-header__right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* User Dropdown */
.brand-members-header__dropdown {
    position: relative;
}

.brand-members-header__dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 10px;
    border: none;
    border-radius: var(--radius-lg);
    background: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
    font-family: inherit;
    font-size: var(--font-size-sm);
    color: var(--color-gray-700);
}

.brand-members-header__dropdown-trigger:hover {
    background-color: var(--color-gray-50);
}

.brand-members-header__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0;
}

.brand-members-header__user-name {
    font-weight: var(--font-weight-medium);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-members-header__chevron {
    font-size: 10px;
    color: var(--color-gray-400);
    transition: transform 0.2s ease;
}

.brand-members-header__dropdown-trigger[aria-expanded="true"] .brand-members-header__chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.brand-members-header__dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.12), 0 2px 8px -2px rgba(15, 23, 42, 0.06);
    padding: var(--space-1);
    z-index: 1001;
}

.brand-members-header__dropdown-menu.is-visible {
    display: block;
}

/* Dropdown user info header */
.brand-members-header__dropdown-user {
    padding: var(--space-3) var(--space-3) var(--space-2);
}

.brand-members-header__dropdown-name {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-900);
    line-height: 1.3;
}

.brand-members-header__dropdown-email {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-gray-400);
    margin-top: 2px;
    line-height: 1.3;
}

.brand-members-header__dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-gray-600);
    text-decoration: none;
    transition: all 0.15s ease;
}

.brand-members-header__dropdown-item:hover {
    background-color: var(--color-gray-50);
    color: var(--color-gray-800);
    text-decoration: none;
}

.brand-members-header__dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--color-gray-400);
}

.brand-members-header__dropdown-item:hover i {
    color: var(--color-gray-600);
}

.brand-members-header__dropdown-item--danger:hover {
    color: var(--color-danger);
}

.brand-members-header__dropdown-item--danger:hover i {
    color: var(--color-danger);
}

.brand-members-header__dropdown-divider {
    height: 1px;
    background-color: var(--color-gray-100);
    margin: var(--space-1) 0;
}

/* Mobile Hamburger Toggle */
.brand-members-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
}

.brand-members-header__toggle:hover {
    background-color: var(--color-gray-50);
}

.brand-members-header__toggle span {
    width: 18px;
    height: 2px;
    background-color: var(--color-gray-600);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.brand-members-header__toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.brand-members-header__toggle.active span:nth-child(2) {
    opacity: 0;
}

.brand-members-header__toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Members Header Responsive ── */
@media (max-width: 991px) {
    .brand-members-header {
        height: 56px;
    }

    .brand-members-header__container {
        padding: 0 var(--space-4);
    }

    .brand-members-header__logo img {
        height: 24px;
    }

    /* Show hamburger on mobile */
    .brand-members-header__toggle {
        display: flex;
    }

    /* Hide user name + chevron, keep avatar */
    .brand-members-header__user-name {
        display: none;
    }

    .brand-members-header__chevron {
        display: none;
    }

    /* Hide desktop dropdown on mobile (use slide-out panel instead) */
    .brand-members-header__dropdown-menu {
        display: none !important;
    }

    .brand-members-header__right {
        gap: var(--space-2);
    }
}
