html {
overflow-y:scroll;
overflow-x: hidden;
}
body {
font:1em Arial, Helvetica, sans-serif;
overflow-x: hidden;
}

/* Ensure proper box-sizing for all elements */
*, *::before, *::after {
box-sizing: border-box;
}

/* Body container - centered on desktop, full width on mobile */
#bodyContainer {
max-width: 1400px;
width: 100%;
margin-left: auto;
margin-right: auto;
padding-left: 1rem;
padding-right: 1rem;
overflow-x: hidden;
box-sizing: border-box;
}

@media (max-width: 640px) {
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}
#bodyContainer {
    padding-left: 2px !important;
    padding-right: 2px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
}
/* Force all nested divs to respect container width */
#bodyContainer > div,
#bodyContainer .main-content,
#bodyContainer .card,
#bodyContainer article,
.main-content > * {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}
/* Ensure card content doesn't overflow */
.card, .card > * {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
}
/* Reduce card padding on mobile to prevent overflow */
.card .p-4 {
    padding: 10px !important;
}
.card .px-4 {
    padding-left: 10px !important;
    padding-right: 10px !important;
}
/* NUCLEAR OPTION: Force EVERYTHING to stay within container */
#bodyContainer *:not(script):not(style) {
    box-sizing: border-box !important;
}
/* Fix any horizontal scrolling at root level */
html {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
}
body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative !important;
}
/* FIX: Google AdSense iframes causing overflow with fixed 765px width */
.google-auto-placed,
.adsbygoogle,
ins.adsbygoogle,
[id^="aswift_"],
[id$="_host"],
iframe[id^="aswift_"] {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
}
/* Force iframe containers to be responsive */
.google-auto-placed ins,
.google-auto-placed div {
    max-width: 100% !important;
    overflow: hidden !important;
}
/* Ensure card content stays within bounds */
.card .p-4,
.card > div {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}
/* Fix main grid container */
main.grid {
    max-width: 100% !important;
    overflow-x: hidden !important;
}
/* main-content width is controlled by grid in header.php */
.main-content {
    max-width: 100% !important;
    overflow-x: hidden !important;
}
/* Fix Google annotation links that inject box-sizing: content-box */
.google-anno, a.google-anno {
    box-sizing: border-box !important;
    max-width: 100% !important;
    display: inline !important;
}
/* Extra containment for any problematic inline elements */
#bodyContainer a, #bodyContainer span {
    max-width: 100% !important;
    word-wrap: break-word !important;
}
/* Prevent tables from causing horizontal overflow */
table {
    max-width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}
/* Forum tables wrapper - make scrollable */
.forumline {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}
/* Override nowrap on mobile */
td, th {
    white-space: normal !important;
    word-wrap: break-word;
}
/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}
/* Forum post content */
.postbody {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
/* Quote and code blocks */
.quote, .code {
    max-width: 100%;
    overflow-x: auto;
}
}

/* Fix div#one white text issue - ensure dark text on all sites */
#one, #one *, .wrapper, .wrapper * {
    color: #1f2937 !important; /* dark gray text */
}
#one h1, #one h2, #one h3, #one h4, #one h5, #one h6 {
    color: #111827 !important; /* darker for headings */
}

/* ============================================
   READABILITY FIXES - Lakers/All Sites
   ============================================ */

/* 1. Sidebar content - ensure dark text for readability */
aside .card .p-4,
aside .card .pn-normal,
aside .card .text-sm,
.sidebar .card .p-4,
.sidebar .card .pn-normal,
/* High specificity selectors for sidebar widgets */
aside .card .p-4 *,
aside .card .pn-normal *,
.card .p-4.pn-normal,
.card .p-4.pn-normal *,
.card .p-4.pn-normal span,
.card .p-4.pn-normal p,
.card .p-4.pn-normal div,
.card .p-4.pn-normal i,
.card .pn-normal.text-sm,
.card .pn-normal.text-sm * {
}

/* Sidebar pn-title headers inside content (not the gradient header) */
.card .p-4 .pn-title,
.card .pn-normal .pn-title {
    color: #1f2937 !important; /* darker for sub-headers */
    font-weight: bold;
}

/* 2. Sidebar header links - white text on purple/blue gradient backgrounds */
aside .card h3 a,
aside .card .pn-title a,
.sidebar .card h3 a,
.sidebar .card .pn-title a,
h3.pn-title a,
.pn-title a,
div[style*="gradient"] h3 a,
div[style*="gradient"] .pn-title a {
    text-decoration: none;
}
aside .card h3 a:hover,
.sidebar .card h3 a:hover,
h3.pn-title a:hover,
.pn-title a:hover {
    color: #e5e7eb !important; /* slight gray on hover */
    text-decoration: underline;
}

/* 3. Forum topic rows - ensure dark text on light backgrounds */
.border-b.border-gray-200 .text-gray-700,
.border-b.border-gray-200 .text-center,
.border-b .text-gray-700,
.hidden.md\:grid .text-gray-700,
.hidden.md\:grid .text-center.text-gray-700 {
    color: #374151 !important; /* gray-700 */
}

/* 4. Forum row links should be blue */
.border-b.border-gray-200 a.text-blue-600,
.border-b a.text-blue-600 {
    color: #2563eb !important; /* blue-600 */
}

/* 5. Alternating row backgrounds - ensure text is dark */
.bg-gray-100 .text-gray-700,
.bg-gray-100 .text-center,
.bg-white .text-gray-700,
.bg-white .text-center {
}

/* 6. Mobile forum view text */
.block.md\:hidden .text-gray-700,
.block.md\:hidden .text-xs,
.block.md\:hidden .text-gray-600 {
    color: #4b5563 !important; /* gray-600 */
}

/* 7. Poster names and dates in forum rows */
div[class*="text-gray-700"]:not(.forum-topics-header *) {
    color: #374151 !important;
}

/* 8. Ensure all card content has readable text */
.card .pn-normal,
.card .text-sm,
.card p,
.card span:not([class*="bg-"]) {
}

/* 9. But keep header row text white (on colored backgrounds) */
.forum-topics-header,
.forum-topics-header *,
.forum-topics-header div,
.forum-topics-header .text-center,
.forum-topics-header .text-white,
div.forum-topics-header > div {
    color: #ffffff !important;
}

/* 10. Form inputs - ensure readable text with proper backgrounds */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
textarea,
select {
    background-color: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #d1d5db !important;
}
input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
}
/* Form inputs on focus */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus {
    background-color: #ffffff !important;
    color: #1f2937 !important;
    outline: 2px solid #3b82f6 !important;
    border-color: #3b82f6 !important;
}

/* 11. Links inside content areas should be blue */
.card .pn-normal a,
.card .p-4 a:not([class*="bg-"]) {
}

/* 11. Schedule/sidebar specific widgets */
aside .card a,
.sidebar .card a {
    color: #2563eb !important;
}
/* But links in headers stay white */
aside .card h3 a,
aside .card .pn-title a,
aside .card div[style*="gradient"] a {
    color: #ffffff !important;
}

/* 12. Cookie consent banner - improve contrast */
.cc-btn.cc-dismiss {
    color: #0d9488 !important; /* teal-600 - better contrast */
    background-color: #f0fdfa !important;
    border: 2px solid #0d9488 !important;
}
.cc-btn.cc-dismiss:hover {
    background-color: #0d9488 !important;
    color: #ffffff !important;
}
