/* =====================================================================
   Dashboard Navigation Sidebar
   Dark blue visual system — matches all member pages
   ===================================================================== */

/* -----------------------------------------------------------------
   Nav Wrapper
   ----------------------------------------------------------------- */
.tctm-dashboard-nav {
    /*background: linear-gradient(180deg, #123C6B 0%, #1E64B7 100%);
    border-radius: 14px;*/
    padding: 0 0 18px;
    margin: 0;
    gap: 0 !important;
    /*box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);*/
    color: #EAF2FF;
    overflow: hidden;
	border-radius: 8px;
}

/* -----------------------------------------------------------------
   Branding Logo
   ----------------------------------------------------------------- */
.tctm-nav-logo-wrap {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.12);
}

.tctm-nav-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: opacity 0.2s ease;
}
li.menu-title {
    padding: 10px 20px;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.7;
}
.tctm-nav-logo-img {
    max-width: 200px !important;
    width: 200px !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    filter: brightness(1.15) drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5)) !important;
}

/* -----------------------------------------------------------------
   Mobile Close Row
   ----------------------------------------------------------------- */
.tctm-nav-close-row {
    display: none;
}
.tctm-nav-close-btn {
    background: rgb(17 54 95);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #AFC6E8;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    position: fixed;
    right: -16px;
    top: 20px;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}
.tctm-nav-close-btn svg {
    width: 20px;
}

/* -----------------------------------------------------------------
   User Info Block
   ----------------------------------------------------------------- */
.tctm-nav-user-block {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.12);
}

.tctm-nav-avatar-wrap {
    flex-shrink: 0;
}

.tctm-nav-avatar-img {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.28) !important;
    display: block !important;
}

.tctm-nav-user-info {
    flex: 1;
    min-width: 0;
}

.tctm-nav-user-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #EAF2FF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.tctm-nav-user-tier {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 600;
    color: #AFC6E8;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tctm-tier-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #5EA6FF;
    display: inline-block;
    flex-shrink: 0;
}

/* Tier colour accents */
.tctm-nav-user-tier.tier-silver .tctm-tier-dot  { background-color: #9DB8D2; }
.tctm-nav-user-tier.tier-gold .tctm-tier-dot    { background-color: #F5A623; }
.tctm-nav-user-tier.tier-titanium .tctm-tier-dot { background-color: #C4D4E8; }

/* -----------------------------------------------------------------
   TCT OS Access Banner — top of all member pages
   ----------------------------------------------------------------- */
.tctm-access-banner {
    background: linear-gradient(135deg, #0E3260 0%, #1A4D8E 100%);
    border-radius: 10px;
    margin-top: 0;
    margin-bottom: 15px;
    border-left: 4px solid #5EA6FF;
    overflow: hidden;
}

.tctm-access-banner.tier-silver   { border-left-color: #9DB8D2; }
.tctm-access-banner.tier-gold     { border-left-color: #F5A623; }
.tctm-access-banner.tier-titanium { border-left-color: #C4D4E8; }

.tctm-access-banner-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
}

/* Left: icon + label */
.tctm-access-banner-label {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: #AFC6E8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tctm-access-banner-icon {
    font-size: 14px;
    color: #5EA6FF;
}

.tctm-access-banner.tier-silver   .tctm-access-banner-icon { color: #9DB8D2; }
.tctm-access-banner.tier-gold     .tctm-access-banner-icon { color: #F5A623; }
.tctm-access-banner.tier-titanium .tctm-access-banner-icon { color: #C4D4E8; }

/* Centre: track + milestones */
.tctm-access-banner-bar {
    flex: 1;
    min-width: 0;
}

.tctm-access-banner-track {
    height: 7px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 6px;
}

.tctm-access-banner-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, #1E64B7, #5EA6FF);
    transition: width 0.6s ease;
}

.tctm-access-banner-fill.tier-silver   { background: linear-gradient(90deg, #5E8FBF, #9DB8D2); }
.tctm-access-banner-fill.tier-gold     { background: linear-gradient(90deg, #B8850A, #F5A623); }
.tctm-access-banner-fill.tier-titanium { background: linear-gradient(90deg, #7A9DC4, #C4D4E8); }

.tctm-access-banner-milestones {
    display: flex;
    justify-content: space-between;
}

.tctm-access-banner-milestone {
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: rgba(175, 198, 232, 0.3);
}

.tctm-access-banner-milestone.reached {
    color: #AFC6E8;
}

/* Right: percentage + tier badge */
.tctm-access-banner-badge {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.tctm-access-banner-pct {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    color: #5EA6FF;
}

.tctm-access-banner-badge.tier-silver   .tctm-access-banner-pct { color: #9DB8D2; }
.tctm-access-banner-badge.tier-gold     .tctm-access-banner-pct { color: #F5A623; }
.tctm-access-banner-badge.tier-titanium .tctm-access-banner-pct { color: #C4D4E8; }

.tctm-access-banner-tier {
    font-size: 10px;
    font-weight: 600;
    color: #AFC6E8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Mobile: stack label above bar, hide milestone labels */
@media (max-width: 600px) {
    .tctm-access-banner-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }

    .tctm-access-banner-label {
        flex: 1 0 auto;
    }

    .tctm-access-banner-badge {
        flex-direction: row;
        align-items: baseline;
        gap: 5px;
    }

    .tctm-access-banner-bar {
        flex: 1 0 100%;
        order: 3;
    }

    .tctm-access-banner-milestone {
        font-size: 8.5px;
    }
}

/* -----------------------------------------------------------------
   Divider
   ----------------------------------------------------------------- */
.tctm-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 14px 6px;
}

/* -----------------------------------------------------------------
   Navigation List
   ----------------------------------------------------------------- */
.tctm-nav-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tctm-nav-item {
    margin: 0 !important;
}

.tctm-nav-item:last-child {
    border-bottom: none !important;
}

.tctm-nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 15px 20px !important;
    color: rgb(255 255 255 / 60%) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-left: 3px solid transparent !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease !important;
    line-height: 1.3 !important;
}

.tctm-nav-link:hover,
.tctm-nav-link:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    padding-left: 25px !important;
    text-decoration: none !important;
    outline: none !important;
}

.tctm-nav-item.active .tctm-nav-link {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-left-color: #5EA6FF !important;
    padding-left: 20px !important;
}

.tctm-nav-icon {
    width: 20px !important;
    text-align: center !important;
    font-size: 18px !important;
    flex-shrink: 0 !important;
    opacity: 0.7;
    color: inherit !important;
}

.tctm-nav-item.active .tctm-nav-link .tctm-nav-icon,
.tctm-nav-link:hover .tctm-nav-icon {
    opacity: 1;
}

.tctm-nav-label {
    flex: 1 !important;
}

/* =====================================================================
   Mobile Hamburger Toggle — full-width top stripe
   ===================================================================== */

/* Hidden on desktop; revealed as a full-width bar on mobile */
.tctm-sidebar-toggle {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    z-index: 9997;
    border-radius: 0;
    background: linear-gradient(135deg, #0E3260 0%, #1A57A3 100%);
    border: none;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    gap: 30px;
    transition: background 0.2s ease;
}

.tctm-sidebar-toggle:hover {
    background: linear-gradient(135deg, #123C6B 0%, #1E64B7 100%);
}

.tctm-toggle-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #EAF2FF;
}

.tctm-toggle-icon {
    font-size: 16px;
}

/* Overlay backdrop */
.tctm-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    z-index: 9996;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    cursor: pointer; /* Required: makes iOS Safari fire click events on the div */
    -webkit-tap-highlight-color: transparent;
}

.tctm-sidebar-overlay.tctm-overlay-active {
    display: block;
}
/* =====================================================================
   Responsive — Mobile Sidebar Overlay
   ===================================================================== */
@media (max-width: 1199px) {

    /* Push page content below the fixed 48px stripe */
    body.has-left-sidebar {
        padding-top: 60px !important;
    }

    /* Hide sidebar completely by default on mobile */
    #secondary {
        display: none !important;
    }

    /* Content area takes full width — sidebar is hidden / overlay only */
    #main,
    body.has-left-sidebar .content-area .content-container #main,
    body.has-left-sidebar #main {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }

    /* Show the full-width stripe toggle */
    .tctm-sidebar-toggle {
        display: flex;
    }

    /* Show close (×) row inside the nav on mobile */
    .tctm-nav-close-row {
        display: flex;
    }

    /* Prevent body scroll while sidebar is open */
    body.tctm-nav-open {
        overflow: hidden !important;
    }

    /* Sidebar base — always positioned, off-screen by default */
    #secondary {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        z-index: 9998 !important;
        padding: 16px 12px !important;
        background: linear-gradient(180deg, #123C6B 0%, #1E64B7 100%);
        border-radius: 0 !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5) !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        visibility: hidden !important;
    }

    /* Open state — slide in */
    #secondary.tctm-sidebar-open {
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    #secondary .sidebar-inner-wrap {
        max-height: none !important;
        overflow-y: visible !important;
        position: static !important;
    }

    /* Overlay fade-in */
    .tctm-sidebar-overlay {
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .tctm-sidebar-overlay.tctm-overlay-active {
        display: block;
        opacity: 1;
    }
	.tctm-nav-logo-wrap {
		display: none;
	}
}

@media (min-width: 1200px) {
    /* Ensure sidebar is always visible on desktop */
    #secondary {
        display: block !important;
    }

    /* Hide close button on desktop */

    /* Let the inner wrap flow naturally so sticky works correctly */
    #secondary .sidebar-inner-wrap {
        max-height: none !important;
        overflow-y: visible !important;
	    background: linear-gradient(180deg, #123C6B 0%, #1E64B7 100%);
		min-height: calc(100vh - 40px) !important;
		border-radius: 8px;
    }
}

/* -----------------------------------------------------------------
   Override theme sidebar container styles
   ----------------------------------------------------------------- */
body.has-left-sidebar .content-area .content-container aside#secondary {
    box-shadow: unset !important;
    padding: unset !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    vertical-align: top !important;
}

/* Sticky sidebar — desktop only */
@media (min-width: 1200px) {
    body.has-left-sidebar .content-area .content-container aside#secondary {
        /*position: sticky !important;
        top: 20px !important;
        align-self: flex-start !important;*/
        height: calc(100vh - 40px) !important;
		position: sticky;
		top: 20px;
    }
}

/* #main full-width on mobile is handled in the main mobile block above */

/* -----------------------------------------------------------------
   Custom Scrollbar — sidebar (#secondary) and nav wrapper
   ----------------------------------------------------------------- */
#secondary,
.tctm-dashboard-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

#secondary::-webkit-scrollbar,
.tctm-dashboard-nav::-webkit-scrollbar {
    width: 4px;
}

#secondary::-webkit-scrollbar-track,
.tctm-dashboard-nav::-webkit-scrollbar-track {
    background: transparent;
}

#secondary::-webkit-scrollbar-thumb,
.tctm-dashboard-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 100px;
}

#secondary::-webkit-scrollbar-thumb:hover,
.tctm-dashboard-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}
