/* Coterie Legal Layout
 * Location: /wp-content/themes/coterie/tco-legal/assets/css/legal.css
 */

/* Hide sidebar on main page */
.page-id-16594 .coterieLegalNav {
	display: none;
}

.page-id-16594 .coterieLegalLayout::before {
	display: none;
}

/* Base container and typography */

.coterieLegalContainer {
    box-sizing: border-box;
    max-width: 72rem;
    margin: 2rem auto;
    border: 1px solid #dddddd;
    background-color: #ffffff;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.coterieLegalTitle,
.coterieLegalNav,
.coterieLegalContent {
    padding: 2em;
    box-sizing: border-box;
}

.coterieLegalNav {
	padding-left: 10px !important;
}

/* Title */

.coterieLegalTitle {
    border-bottom: 1px solid #dddddd;
}

.coterieLegalTitleHeading {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Layout */

.coterieLegalLayout {
    display: flex;
    flex-wrap: wrap;
}

/* Navigation column */

.coterieLegalNav {
    width: 30%;
    border-right: 0px solid #dddddd;
}

.coterieLegalNavDesktop {
    margin: 0;
    padding: 0;
}

.coterieLegalContent td {
    vertical-align: top !important; 
}

.coterieLegalNavDesktop ul:first-child,
.coterieLegalNavDesktop ol:first-child {
    margin: 0 0 1em 1.25em;
    margin-left: 0 !important;	
    padding: 0;
}

/* Top-level nav items numbered, nested items lowercase letters */
.coterieLegalNavDesktop > ul,
.coterieLegalNavDesktop > ol {
    /* list-style-type: decimal; */
	list-style-type: none;
}

/* Any nested list inside the nav becomes lower-alpha */
.coterieLegalNavDesktop ul ul,
.coterieLegalNavDesktop ol ol,
.coterieLegalNavDesktop ul ol,
.coterieLegalNavDesktop ol ul {
    /* list-style-type: lower-alpha; */
	 list-style-type: none;
}

/* Match marker size to small nav text */
.coterieLegalNavList > li::marker {
    font-size: 0.85rem; /* same as your nav text */
}

/* Slightly smaller markers for nested items (optional) */
.coterieLegalNavList ol li::marker,
.coterieLegalNavList ul li::marker {
    font-size: 0.85rem;
}

.coterieLegalNavNum {
	display: inline-block;
	min-width: 2.1em;
}

.coterieLegalNavDesktop a {
    text-decoration: none;
    color: #004f9f;
    font-size: 0.85rem;
}

.coterieLegalNavDesktop a:hover,
.coterieLegalNavDesktop a:focus {
    text-decoration: underline;
}

/* Mobile/tablet select navigation */

.coterieLegalNavMobile {
    margin-top: 1.5rem;
}

.coterieLegalNavForm {
    display: block;
}

.coterieLegalNavLabel {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.coterieLegalNavSelect {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #cccccc;
    font-size: 0.95rem;
    font-family: inherit;
}

/* Content column */

.coterieLegalContent {
    width: 70%;
}

.coterieLegalContentInner {
    max-width: 40rem;
}

.coterieLegalContentInner h2,
.coterieLegalContentInner h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.coterieLegalContentInner p {
    line-height: 1.6;
    margin-bottom: 1em;
}

.coterieLegalContentInner ul,
.coterieLegalContentInner ol {
    margin-left: 0em;
    margin-bottom: 1em;
}

/* Fallback for missing nav */

.coterieLegalNavEmpty {
    margin: 0;
    font-size: 0.9rem;
    color: #666666;
}

/* ============================
   Responsive breakpoints
   ============================ */

/* Phone - vertical (up to 479px) */
@media (max-width: 479.98px) {
    .coterieLegalLayout {
        flex-direction: column;
    }

    .coterieLegalNav,
    .coterieLegalContent {
        width: 100%;
        border-right: none;
    }

    .coterieLegalNavDesktop {
        display: none;
    }

    .coterieLegalNavMobile {
        display: block;
    }
}

/* Phone - horizontal (480px to 767px) */
@media (min-width: 480px) and (max-width: 767.98px) {
    .coterieLegalLayout {
        flex-direction: column;
    }

    .coterieLegalNav,
    .coterieLegalContent {
        width: 100%;
        border-right: none;
    }

    .coterieLegalNavDesktop {
        display: none;
    }

    .coterieLegalNavMobile {
        display: block;
    }
}

/* Tablet - vertical (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .coterieLegalLayout {
        flex-direction: column;
    }

    .coterieLegalNav,
    .coterieLegalContent {
        width: 100%;
        border-right: none;
    }

    .coterieLegalNavDesktop {
        display: none;
    }

    .coterieLegalNavMobile {
        display: block;
    }
}

/* Laptop (1024px to 1279px) */
@media (min-width: 1024px) and (max-width: 1279.98px) {
    .coterieLegalLayout {
        flex-direction: row;
    }

    .coterieLegalNav {
        width: 30%;
        border-right: none;
    }

    .coterieLegalContent {
        width: 70%;
    }

    .coterieLegalNavDesktop {
        display: block;
    }

    .coterieLegalNavMobile {
        display: none;
    }
}

/* Full-height vertical divider between nav and content on desktop+ */
@media (min-width: 1024px) {
    .coterieLegalLayout {
        position: relative;
    }

    .coterieLegalLayout::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 1px;
        background: #dddddd;
        left: 30%;              /* matches nav width */
        transform: translateX(-0.5px); /* nudge to avoid sub-pixel fuzziness */
        pointer-events: none;
    }
}

/* Desktop (1280px to 1599px) */
@media (min-width: 1280px) and (max-width: 1599.98px) {
    .coterieLegalLayout {
        flex-direction: row;
    }

    .coterieLegalNav {
        width: 30%;
        border-right: 0px solid #dddddd;
    }

    .coterieLegalContent {
        width: 70%;
    }

    .coterieLegalNavDesktop {
        display: block;
    }

    .coterieLegalNavMobile {
        display: none;
    }
}

/* Widescreen (1600px and up) */
@media (min-width: 1600px) {
    .coterieLegalContainer {
        max-width: 80rem;
    }

    .coterieLegalLayout {
        flex-direction: row;
    }

    .coterieLegalNav {
        width: 30%;
        border-right: 1px solid #dddddd;
    }

    .coterieLegalContent {
        width: 70%;
    }

    .coterieLegalNavDesktop {
        display: block;
    }

    .coterieLegalNavMobile {
        display: none;
    }
}


.coterieLegalContentInner h1[id],
.coterieLegalContentInner h2[id],
.coterieLegalContentInner h3[id],
.coterieLegalContentInner h4[id],
.coterieLegalContentInner h5[id],
.coterieLegalContentInner h6[id]{
    scroll-margin-top: 150px;
}



/* Desktop nav layout + class-based sticky via JS */
@media (min-width: 1024px) {
    .coterieLegalLayout {
        align-items: flex-start; /* don't stretch children vertically */
    }

    .coterieLegalNav {
        width: 30%;
        border-right: 1px solid #dddddd;
        position: relative;      /* normal flow */
    }

    .coterieLegalContent {
        width: 70%;
    }

    /* Default: nav content just sits in the column */
    .coterieLegalNavDesktop {
        position: relative;
    }

    /* When JS decides to "stick" it */
    .coterieLegalNavDesktopFixed {
        position: fixed;
		max-height: 80vh !important;
		max-width: 375px !important;;
        top: 150px;      /* same as your header offset */
        z-index: 800;    /* under header, above content */
		overflow-y: scroll;
		direction: rtl;
				padding-left: 1em;
		
    }
	
	.coterieLegalNavDesktopFixed .coterieLegalNavList {
		direction: ltr;
	}
}