/* Nysnö Public CSS */
/* Shared base styles for all public-facing pages (community, checkout, events, etc.) */

/* Font Declarations */
@font-face {
    font-family: 'Avertape';
    src: url('../nysno-images/avertape-semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Averta';
    src: url('../nysno-images/averta-light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Averta';
    src: url('../nysno-images/averta-regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Averta';
    src: url('../nysno-images/averta-regular-italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Averta';
    src: url('../nysno-images/averta-bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Averta';
    src: url('../nysno-images/averta-semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Averta';
    src: url('../nysno-images/averta-extrabold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Averta';
    src: url('../nysno-images/averta-black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Design Tokens (matching nysno.se) */
:root {
    --c-purple: #75479a;
    --c-pink: #f57aa7;
    --c-bg: #eae0d2;
    --c-text: #1a1b1f;
    --c-text-muted: #8d8579;
    --c-border: #ddd3c4;
    --c-card-bg: #fff;
    --c-card-border: #ddd3c4;
    --c-gradient: linear-gradient(135deg, #75479a 0%, #f57aa7 100%);
    --font-body: 'Averta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Avertape', serif;
    --radius-sm: 4px;
    --radius-md: 4px;
    --radius-lg: 4px;
    --shadow-card: 0 2px 8px rgba(26, 27, 31, 0.06);
    --shadow-hover: 0 4px 16px rgba(26, 27, 31, 0.1);
    --max-width: 1400px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Navbar fix: without langpicker the space-between pushes logo away */
.nav-menu.w-nav-menu {
    justify-content: flex-start;
}

/* Our logo link points to external https://nysno.se and never becomes
   Webflow's w--current. Mimic the w--current state so icon vertical alignment
   matches nysno.se at all breakpoints. */
.navbar-logo {
    padding-top: 0;
}

/* Kill whitespace gaps between inline-block .w-dropdown siblings
   (nysno.se live serves minified HTML without whitespace between tags) */
.nav-menu.w-nav-menu > div {
    font-size: 0;
}
.nav-menu.w-nav-menu > div > .w-dropdown {
    font-size: 1rem;
}

/* Webflow dropdown hover (no JS needed) */
.w-dropdown:hover > .w-dropdown-list {
    display: block !important;
}

.w-dropdown-list {
    display: none;
}

/* Match nysno.se inline override (pushes underlines 0.25em below baseline) */
.footer-link,
.link,
.primary-button {
    text-underline-offset: 0.25em;
}

/* Shared main content area */
.nysno-main {
    min-height: calc(100vh - 200px);
    background-color: var(--c-bg);
    font-family: var(--font-body);
    color: var(--c-text);
}

/* Shared alert styles */
.nysno-alert {
    max-width: var(--max-width);
    margin: 16px auto;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-body);
}

.nysno-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.nysno-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Community subnav (shared — shown for logged-in members on all public pages) */
.community-subnav {
    background-color: var(--c-bg);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 999;
}

.community-subnav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
}

.community-subnav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.community-subnav-link {
    color: var(--c-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
    padding: 12px 0;
    position: relative;
}

.community-subnav-link:hover {
    color: var(--c-purple);
}

.community-subnav-link.active {
    color: var(--c-purple);
}

.community-subnav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--c-gradient);
}

.community-subnav-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--c-text-muted);
}

.community-subnav-logout {
    color: var(--c-text);
    text-decoration: underline;
    font-weight: 600;
    font-size: 14px;
    text-underline-offset: 0.25em;
    transition: color 0.2s ease;
}

.community-subnav-logout:hover {
    color: var(--c-text-muted);
}

.community-nav-badge {
    background: var(--c-purple);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

@media (max-width: 991px) {
    .community-subnav-inner {
        padding: 0 20px;
        flex-wrap: wrap;
        height: auto;
        min-height: 48px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .community-subnav-links {
        gap: 16px;
    }

    .community-subnav-user {
        display: none;
    }
}

@media (max-width: 767px) {
    .community-subnav-links {
        gap: 12px;
        flex-wrap: wrap;
    }

    .community-subnav-link {
        font-size: 13px;
    }
}

/* Mobile hamburger menu support */
@media (max-width: 991px) {
    .nav-menu.w-nav-menu.community-mobile-open {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--c-bg);
        z-index: 10000;
        padding: 24px 7.5px 32px;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    /* Burger → X animation (matches live: 35px bun shrinks to 28px when open) */
    .menu-button-3.community-nav-open .top-bun,
    .menu-button-3.community-nav-open .bottom-bun {
        width: 28px;
    }

    .menu-button-3.community-nav-open .top-bun {
        transform: translate(3.5px, 0) rotate(-45deg);
    }

    .menu-button-3.community-nav-open .patty {
        opacity: 0;
    }

    .menu-button-3.community-nav-open .bottom-bun {
        transform: translate(3.5px, 0) rotate(45deg);
    }

    .top-bun, .patty, .bottom-bun {
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    /* Stack dropdowns vertically */
    .nav-menu.w-nav-menu.community-mobile-open .w-dropdown {
        position: relative;
        width: 100%;
    }

    .nav-menu.w-nav-menu.community-mobile-open .dropdown-toggle {
        padding: 10px 30px 10px 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }

    .nav-menu.w-nav-menu.community-mobile-open .w-icon-dropdown-toggle {
        order: 2;
        margin-left: auto;
        margin-right: 0;
    }

    .nav-menu.w-nav-menu.community-mobile-open .w-dropdown-list {
        position: static !important;
        display: none;
        background: transparent;
        box-shadow: none;
    }

    .nav-menu.w-nav-menu.community-mobile-open .w-dropdown-list.w--open {
        display: block;
    }

    .nav-menu.w-nav-menu.community-mobile-open .nav-menu-items {
        display: none;
    }

    /* Disable hover-based dropdown on mobile */
    .nav-menu.w-nav-menu.community-mobile-open .w-dropdown:hover > .w-dropdown-list {
        display: none;
    }

    .nav-menu.w-nav-menu.community-mobile-open .w-dropdown:hover > .w-dropdown-list.w--open {
        display: block;
    }
}
