/* ========================================
   Registration Menu Styles — Header & Mobile Navigation
   Sign Up dropdown for Retail/Wholesale/B2B
   ======================================== */

:root {
    --tmc-primary: #1b5e20;
    --tmc-retail: #333;
    --tmc-wholesale: #1565c0;
    --tmc-b2b: #6a1b9a;
    --tmc-text: #333;
    --tmc-text-light: #666;
    --tmc-border: #e0e0e0;
    --tmc-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --tmc-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ─── Desktop Header Menu ─────────────────────────────────────────────── */

.tmc-signup-menu {
    position: relative;
}

.tmc-signup-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--tmc-text);
}

.tmc-signup-toggle:hover {
    background-color: rgba(27, 94, 32, 0.08);
    color: var(--tmc-primary);
}

.tmc-signup-caret {
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.tmc-signup-menu:hover .tmc-signup-caret {
    transform: rotate(180deg);
    opacity: 1;
}

/* ─── Dropdown Menu ───────────────────────────────────────────────────── */

.tmc-signup-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--tmc-border);
    border-radius: 8px;
    box-shadow: var(--tmc-shadow);
    min-width: 280px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.tmc-signup-menu:hover .tmc-signup-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ─── Dropdown Items ──────────────────────────────────────────────────── */

.tmc-signup-dropdown .menu-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tmc-signup-dropdown .menu-item a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    color: var(--tmc-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.tmc-signup-dropdown .menu-item a:hover {
    background-color: rgba(27, 94, 32, 0.05);
    border-left-color: var(--tmc-primary);
}

/* First item (Retail) */
.tmc-signup-dropdown .menu-item:first-child a {
    border-left-color: transparent;
}

.tmc-signup-dropdown .menu-item:first-child a:hover {
    border-left-color: #555;
}

/* Second item (Wholesale) */
.tmc-signup-dropdown .menu-item:nth-child(2) a:hover {
    border-left-color: var(--tmc-wholesale);
}

/* Third item (B2B) */
.tmc-signup-dropdown .menu-item:nth-child(3) a:hover {
    border-left-color: var(--tmc-b2b);
}

/* Icon */
.tmc-signup-icon {
    font-size: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: rgba(27, 94, 32, 0.08);
    border-radius: 6px;
}

/* Label & Description */
.tmc-signup-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--tmc-text);
}

.tmc-signup-desc {
    display: block;
    font-size: 12px;
    color: var(--tmc-text-light);
    margin-top: 2px;
}

/* Divider with Sign In link */
.tmc-signup-dropdown .menu-divider {
    border-top: 1px solid var(--tmc-border);
    margin-top: 8px;
    padding-top: 8px;
}

.tmc-signup-dropdown .menu-divider a {
    padding: 10px 16px;
    text-align: center;
    border: none;
}

.tmc-signup-login {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--tmc-primary);
}

.tmc-signup-dropdown .menu-divider a:hover {
    background-color: transparent;
}

/* ─── Mobile Menu (Collapsible) ───────────────────────────────────────── */

@media (max-width: 767px) {
    .tmc-signup-menu {
        position: static;
    }

    .tmc-signup-dropdown {
        position: static;
        opacity: 0;
        visibility: hidden;
        height: 0;
        overflow: hidden;
        max-height: 0;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        transition: max-height 0.3s ease;
    }

    /* Show on menu open */
    .tmc-signup-menu.open .tmc-signup-dropdown {
        opacity: 1;
        visibility: visible;
        height: auto;
        max-height: 500px;
        background: rgba(249, 251, 247, 0.95);
        border: 1px solid var(--tmc-border);
        padding: 8px 0;
        margin-top: 8px;
    }

    .tmc-signup-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .tmc-signup-dropdown .menu-item a {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 16px 12px 44px;
    }

    .tmc-signup-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
    }

    .tmc-signup-dropdown .menu-divider {
        border: none;
        margin: 0;
        padding: 0;
    }

    .tmc-signup-dropdown .menu-divider a {
        padding: 12px 16px;
        border-top: 1px solid var(--tmc-border);
        background-color: transparent;
    }
}

/* ─── Responsive Adjustments ─────────────────────────────────────────── */

@media (max-width: 1024px) {
    .tmc-signup-dropdown {
        min-width: 250px;
    }
}

@media (max-width: 480px) {
    .tmc-signup-toggle {
        padding: 10px 12px;
        font-size: 14px;
    }

    .tmc-signup-label {
        font-size: 12px;
    }

    .tmc-signup-desc {
        font-size: 11px;
    }
}

/* ─── Dark Mode Support ───────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .tmc-signup-dropdown {
        background: #2a2a2a;
        border-color: #404040;
    }

    .tmc-signup-dropdown .menu-item a {
        color: #e0e0e0;
    }

    .tmc-signup-label {
        color: #e0e0e0;
    }

    .tmc-signup-desc {
        color: #b0b0b0;
    }

    .tmc-signup-icon {
        background-color: rgba(27, 94, 32, 0.15);
    }

    .tmc-signup-dropdown .menu-divider {
        border-color: #404040;
    }

    @media (max-width: 767px) {
        .tmc-signup-menu.open .tmc-signup-dropdown {
            background: rgba(42, 42, 42, 0.95);
            border-color: #404040;
        }
    }
}

/* ─── Accessibility ──────────────────────────────────────────────────── */

.tmc-signup-toggle:focus-visible,
.tmc-signup-dropdown .menu-item a:focus-visible {
    outline: 2px solid var(--tmc-primary);
    outline-offset: 2px;
}

/* Keyboard navigation support */
.tmc-signup-menu:focus-within .tmc-signup-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Print styles */
@media print {
    .tmc-signup-menu,
    .tmc-signup-dropdown {
        display: none;
    }
}
