/* gateway.css - Premium Glassmorphic Gateway & Auth Overlay for Ahkem Meat */

:root {
    --gateway-bg: rgba(10, 10, 10, 0.85);
    --gateway-card-bg: rgba(20, 20, 20, 0.65);
    --gateway-border: rgba(255, 255, 255, 0.08);
    --gateway-text: #ffffff;
    --gateway-text-muted: rgba(255, 255, 255, 0.6);
    --gateway-accent-gold: #cda776;
    --gateway-accent-orange: #ff7a00;
    --gateway-accent-ruby: #b83b3b;
    --gateway-accent-green: #22c55e;
}

/* Fullscreen Overlay container */
.gateway-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--gateway-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gateway-text);
    font-family: 'Outfit', sans-serif;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.gateway-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Center Card */
.gateway-card {
    background: var(--gateway-card-bg);
    border: 1px solid var(--gateway-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 520px;
    margin: 40px auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(205, 167, 118, 0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: gateway-entrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes gateway-entrance {
    0% {
        transform: translateY(30px) scale(0.96);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Logo and Header */
.gateway-logo {
    height: 55px;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
}

.gateway-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #d5d5d5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gateway-subtitle {
    color: var(--gateway-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Step Layout Switcher */
.gateway-step {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.gateway-step.active {
    display: flex;
}

/* Big Selection Cards */
.gateway-choice-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.gateway-choice-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.gateway-choice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 1;
}

.gateway-choice-card.retail::before {
    background: linear-gradient(135deg, rgba(255, 122, 0, 0.12) 0%, rgba(255, 122, 0, 0.02) 100%);
}

.gateway-choice-card.b2b::before {
    background: linear-gradient(135deg, rgba(205, 167, 118, 0.12) 0%, rgba(205, 167, 118, 0.02) 100%);
}

.gateway-choice-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.gateway-choice-card.retail:hover {
    border-color: rgba(255, 122, 0, 0.45);
    box-shadow: 0 12px 30px rgba(255, 122, 0, 0.06), 0 0 15px rgba(255, 122, 0, 0.03);
}

.gateway-choice-card.b2b:hover {
    border-color: rgba(205, 167, 118, 0.45);
    box-shadow: 0 12px 30px rgba(205, 167, 118, 0.06), 0 0 15px rgba(205, 167, 118, 0.03);
}

.gateway-choice-card:hover::before {
    opacity: 1;
}

.gateway-choice-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.gateway-choice-card.retail h3 {
    color: var(--gateway-accent-orange);
}

.gateway-choice-card.b2b h3 {
    color: var(--gateway-accent-gold);
}

.gateway-choice-card p {
    font-size: 0.9rem;
    color: var(--gateway-text-muted);
    line-index: 1.45;
    position: relative;
    z-index: 2;
}

.gateway-choice-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.5px;
    z-index: 2;
}

.gateway-choice-card.b2b .gateway-choice-badge {
    border-color: rgba(205, 167, 118, 0.25);
    color: var(--gateway-accent-gold);
}

.gateway-choice-card.retail .gateway-choice-badge {
    border-color: rgba(255, 122, 0, 0.25);
    color: var(--gateway-accent-orange);
}

.gateway-choice-card.retail .gateway-choice-badge.coming-soon-badge {
    border-color: rgba(108, 117, 125, 0.3);
    color: #aeb5bc;
    background: rgba(108, 117, 125, 0.15);
    position: relative;
    top: auto;
    right: auto;
    float: right;
    margin-bottom: 8px;
    margin-left: 10px;
}

/* Tabs for Login / Register */
.gateway-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 25px;
}

.gateway-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: var(--gateway-text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.gateway-tab.active {
    color: #ffffff;
    border-bottom-color: var(--gateway-accent-gold);
}

/* Forms */
.gateway-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.gateway-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gateway-group label {
    font-size: 0.85rem;
    color: var(--gateway-text-muted);
    font-weight: 500;
}

.gateway-input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 11px 15px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
}

.gateway-input:focus {
    outline: none;
    border-color: var(--gateway-accent-gold);
    box-shadow: 0 0 10px rgba(205, 167, 118, 0.15);
}

/* Buttons */
.gateway-btn {
    background: var(--gateway-accent-gold);
    color: #0c0c0c;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gateway-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(205, 167, 118, 0.3);
    filter: brightness(1.1);
}

.gateway-btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.gateway-btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: #ffffff;
    box-shadow: none;
}

/* Social Buttons */
.gateway-social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.gateway-btn-social {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.88rem;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.gateway-btn-social:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.gateway-btn-social svg {
    width: 18px;
    height: 18px;
}

/* Divider */
.gateway-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--gateway-text-muted);
    font-size: 0.8rem;
    margin: 15px 0;
}

.gateway-divider::before,
.gateway-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gateway-divider:not(:empty)::before {
    margin-right: .5em;
}

.gateway-divider:not(:empty)::after {
    margin-left: .5em;
}

/* Back Link */
.gateway-back-link {
    font-size: 0.88rem;
    color: var(--gateway-text-muted);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    margin-top: 15px;
    align-self: center;
}

.gateway-back-link:hover {
    color: #ffffff;
}

/* Guest Link */
.gateway-guest-btn {
    background: transparent;
    border: none;
    color: var(--gateway-accent-gold);
    font-weight: 600;
    text-decoration: underline;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 5px;
    align-self: center;
    font-family: inherit;
}

.gateway-guest-btn:hover {
    color: #ffffff;
}

/* Custom Alert / Error styles */
.gateway-error {
    background: rgba(184, 59, 59, 0.15);
    border: 1px solid rgba(184, 59, 59, 0.3);
    color: #fca5a5;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.88rem;
    display: none;
    text-align: left;
}

.gateway-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.88rem;
    display: none;
    text-align: left;
}

/* Navbar Profile Controls (for header.html inclusion) */
.user-profile-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gateway-accent-gold);
    cursor: pointer;
    text-decoration: none;
}

.user-logout-btn {
    font-size: 0.8rem;
    color: var(--gateway-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
}

.user-logout-btn:hover {
    color: var(--gateway-accent-ruby);
}

/* Restructured Registration Form Styles */
.gateway-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.gateway-form-row.full {
    grid-template-columns: 1fr;
}
.gateway-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gateway-accent-gold);
    margin-top: 15px;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 5px;
}
.gateway-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--gateway-text-muted);
    cursor: pointer;
    margin: 8px 0;
}
.gateway-checkbox-label input {
    width: 17px;
    height: 17px;
    accent-color: var(--gateway-accent-gold);
    cursor: pointer;
}
.gateway-collapsible-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 5px;
}

/* Mobile Optimization for Gateway (Single Screen Fit) */
@media (max-width: 600px) {
    .gateway-overlay {
        padding: 10px !important;
    }
    .gateway-card {
        padding: 20px !important;
        border-radius: 16px !important;
        margin: 20px auto !important;
    }
    .gateway-logo {
        height: 40px !important;
        margin-bottom: 10px !important;
    }
    .gateway-title {
        font-size: 1.4rem !important;
        margin-bottom: 5px !important;
    }
    .gateway-subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 15px !important;
        line-height: 1.3 !important;
    }
    .gateway-choice-container {
        gap: 10px !important;
    }
    .gateway-choice-card {
        padding: 15px !important;
    }
    .gateway-choice-card h3 {
        font-size: 1.05rem !important;
        margin-bottom: 5px !important;
    }
    .gateway-choice-card p {
        font-size: 0.78rem !important;
        line-height: 1.3 !important;
    }
    
    /* Auth Form Adjustments */
    .gateway-step {
        gap: 10px !important;
    }
    .gateway-group {
        margin-bottom: 10px !important;
    }
    .gateway-group label {
        font-size: 0.8rem !important;
        margin-bottom: 4px !important;
    }
    .gateway-input {
        padding: 10px 12px !important;
        font-size: 16px !important;
    }
    .gateway-btn {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
        margin-top: 5px !important;
    }
    .gateway-tabs {
        margin-bottom: 12px !important;
    }
    .gateway-tab {
        padding: 10px 15px !important;
        font-size: 0.85rem !important;
    }
    .gateway-form-row {
        gap: 8px !important;
    }
    .gateway-section-title {
        margin-top: 8px !important;
        margin-bottom: 4px !important;
        font-size: 0.85rem !important;
    }

    /* Navbar fixes */
    .user-profile-nav {
        gap: 5px !important;
        margin-right: 5px !important;
    }
    .user-profile-name {
        display: none !important;
    }
    .user-logout-btn {
        font-size: 0.75rem !important;
        text-decoration: underline !important;
    }
    .user-profile-nav > span[style*="margin-right:8px"] {
        margin-right: 4px !important;
        padding: 2px 4px !important;
        font-size: 0.7rem !important;
    }
}
