﻿/* ==========================================================================
   NewhouseNet - User System, Membership Tiers, & Gating Design System
   ========================================================================== */

/* Tier Badges */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.tier-badge.tier-guest {
    background: rgba(107, 114, 128, 0.18);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.tier-badge.tier-member {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.35);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.12);
}

.tier-badge.tier-pro {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.25));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
    animation: proPulse 3s infinite alternate ease-in-out;
}

@keyframes proPulse {
    0% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.2); }
    100% { box-shadow: 0 0 18px rgba(245, 158, 11, 0.45); }
}

.tier-badge.tier-admin {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

/* Micro Lock Badges for Form Inputs */
.badge-lock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 6px;
    user-select: none;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.badge-lock:hover {
    transform: translateY(-1px) scale(1.04);
}

.badge-lock-member {
    background: rgba(6, 182, 212, 0.18);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.4);
}

.badge-lock-pro {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.25));
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.45);
}

/* User Dropdown Menu in Topbar */
.user-menu-wrapper {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 260px;
    background: #111827;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 8px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    animation: dropDownSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-dropdown.show {
    display: flex;
}

@keyframes dropDownSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 6px;
}

.user-dropdown-header .dropdown-name {
    font-weight: 700;
    color: #f9fafb;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-header .dropdown-email {
    font-size: 0.78rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.user-dropdown-header .dropdown-tier-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-dropdown a.dropdown-item, .user-dropdown button.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.user-dropdown a.dropdown-item:hover, .user-dropdown button.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.user-dropdown a.dropdown-item.upgrade-highlight {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(234, 88, 12, 0.15));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
    margin: 4px 0;
}

.user-dropdown a.dropdown-item.upgrade-highlight:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 88, 12, 0.25));
    border-color: rgba(245, 158, 11, 0.4);
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 6px 0;
}

/* Glassmorphic Gating Modal */
.tier-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tier-modal-card {
    background: #111827;
    background: linear-gradient(180deg, #182234 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    padding: 30px;
    position: relative;
    animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.tier-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease;
}

.tier-modal-close:hover {
    color: #ffffff;
}

.tier-modal-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tier-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.tier-modal-icon.member-icon {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.tier-modal-icon.pro-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.2));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.tier-modal-pill {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 12px;
    border-radius: 9999px;
    margin-bottom: 12px;
}

.tier-modal-pill.member-pill {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.4);
}

.tier-modal-pill.pro-pill {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.45);
}

.tier-modal-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: #f9fafb;
    margin: 0 0 8px 0;
}

.tier-modal-desc {
    font-size: 0.92rem;
    color: #9ca3af;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.tier-modal-benefits {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.tier-benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #e5e7eb;
}

.tier-benefit-item svg {
    color: #10b981;
    flex-shrink: 0;
}

.btn-glow-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #000000 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35) !important;
}

.btn-glow-gold:hover {
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.5) !important;
    transform: translateY(-1px);
}

/* Pricing Page Styles */
.pricing-hero {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px auto;
}

.pricing-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 30%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.pricing-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

@media (max-width: 992px) {
    .pricing-cards-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-card {
    background: var(--bg-surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition-smooth);
}

.pricing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.pricing-card.featured {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(180deg, rgba(30, 39, 60, 0.85) 0%, rgba(17, 24, 39, 0.95) 100%);
    box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.15), 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.pricing-card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pricing-header {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.pricing-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    min-height: 40px;
}

.pricing-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 16px;
}

.pricing-amount {
    font-size: 2.6rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.pricing-period {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.pricing-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-feature.active {
    color: var(--text-primary);
}

.pricing-feature svg {
    color: var(--success);
    flex-shrink: 0;
    margin-top: 2px;
}

.pricing-feature.disabled svg {
    color: var(--text-muted);
    opacity: 0.4;
}

.pricing-feature.disabled {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Authentication Page Styles (Login & Register) */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.12) 0%, rgba(11, 15, 25, 1) 70%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
    padding: 36px 32px;
    position: relative;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    text-decoration: none;
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 24px;
}

.auth-alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.auth-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.demo-login-box {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.demo-login-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: center;
}

.demo-pills {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-pill {
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: translateY(-1px);
}
