/* ---------------------------------------------------------------------------
   DSL event folder inner pages (results, recalls, timetable, back numbers, video,
   location, sponsors, coaches) - Nov 2026. Loaded AFTER dsl_home.css, in place of
   the old /dsl/results/_css/mq_result.css. It styles the pages' existing markup
   (#content, #article, #side, #footer, #viewtable...) so their PHP is unchanged.
   Page-local <style> blocks and view_switch.php print their own light-theme rules
   in the body, so the overrides here use ID selectors (or !important) to win.
   --------------------------------------------------------------------------- */

/* Event strip under the header: logo, name and date, links to the event page */
.ev-strip{background:var(--band);border-bottom:1px solid #26262C}
.ev-strip .wrap{display:flex;align-items:center;gap:14px;padding-top:12px;padding-bottom:12px;color:var(--text)}
.ev-strip .wrap:hover .ev-strip-t{color:var(--accent)}
.ev-strip img{height:56px;width:auto;border-radius:8px}
.ev-strip-tx{display:flex;flex-direction:column;gap:2px;min-width:0}
.ev-strip-t{font-family:'Barlow Condensed',sans-serif;font-weight:700;font-size:22px;line-height:1.1;text-transform:uppercase}
.ev-strip-d{color:var(--accent);font-weight:600;font-size:14px}

/* Layout: content column + side column (adverts), footer full width */
#content{max-width:var(--wrap);margin:0 auto;padding:28px 32px 48px;display:flex;flex-wrap:wrap;gap:32px;align-items:flex-start;background:none;box-sizing:border-box;width:auto !important;float:none}
#article,#article_noscroll{flex:999 1 620px;min-width:0;max-width:none !important;width:auto !important;float:none;margin:0;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:22px 24px;color:var(--text);box-shadow:none;height:auto;overflow:visible}
#side{flex:1 1 260px;max-width:340px;min-width:0;margin:0 auto;float:none;width:auto;display:flex;flex-direction:column;gap:12px}
#side img{display:block;width:100% !important;height:auto;border-radius:10px;margin:0 !important}
#side:empty{display:none}
#footer{flex-basis:100%;background:none;border:0;border-top:1px solid #26262C;border-radius:0;padding:20px 0 0;margin:0;color:var(--muted);font-size:14px;text-align:left}
#footer a{color:var(--muted) !important}
#footer a:hover{color:var(--accent) !important}

/* Text inside the content panel */
#article h1,#article h2,#article h3,#article_noscroll h1,#article_noscroll h2{color:var(--text);text-align:left}
#article_title{margin:0 0 12px;font-family:'Barlow Condensed',sans-serif;font-weight:700;font-size:30px;line-height:1.1;text-transform:uppercase;letter-spacing:.5px;text-align:left}
#article a,#article_noscroll a{color:var(--text)}
#article a:hover,#article_noscroll a:hover{color:var(--accent)}
#article p,#article td,#article li{color:var(--text)}
#article [style*="color:#000"],#article [style*="color: #000"],#article [style*="color:#333"],#article_noscroll [style*="color:#000"]{color:var(--text) !important}
#article [style*="color:#555"],#article [style*="color:#666"],#article [style*="color:#999"]{color:var(--muted) !important}
/* Check-in screen (entrylist_collected.php) labels and inputs are dark green */
#article [style*="color:#060"],#article input[type="text"],#article input[type="submit"][style*="font-size"]{color:#6FDC97}
#article input[type="submit"]{color:#111}
#article hr,#article .article_hr{border:0;border-top:1px solid var(--line);margin:14px 0;height:0;background:none}
#article small,#article em{color:inherit}

/* The results / back number / check-in tables */
#viewtable{width:100%;border-collapse:collapse}
#viewtable th{height:0;padding:0}
#viewtable td{padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
#viewtable tr:hover td{background:#1A1A1F}
#viewtable td a{font-weight:600}
#viewtable td small{color:var(--muted)}

/* Recall list: the page prints <hr><a><h2>name</h2></a> per notice */
#article a h2{margin:6px 0;font-size:18px;font-weight:600}
#article a:hover h2{color:var(--accent)}

/* Forms inside the panel (back number search, check-in search) */
#article input[type="text"],#article input[type="search"]{background:var(--card2);border:1px solid #34343C;border-radius:8px;color:var(--text);font:inherit;padding:10px 12px;box-sizing:border-box}
#article input[type="submit"],#article button{background:var(--accent);border:0;border-radius:8px;color:#111;font:inherit;font-weight:600;padding:10px 18px;cursor:pointer;width:auto}

/* view_switch.php - "List events by [# Event Number] [A-Z Event Name]" */
#article .vsw-lbl{color:var(--muted)}
#article .vsw-seg{border-color:var(--line2)}
#article .vsw-seg a{color:var(--text)}
#article .vsw-seg a.on{background:var(--accent);color:#111}
#article .vsw-seg a:not(.on):hover{background:#1A1A1F}
#article .vsw-ord,#article .vsw-col{background:transparent;border-color:var(--line2);color:var(--text)}
#article .vsw-ord:hover,#article .vsw-col:hover{border-color:var(--accent);background:transparent}
#article .vsw-ord svg{stroke:var(--accent)}
#article .vsw-col{color:#6FDC97}
#article .vsw-find input{background:var(--card2);border-color:#34343C;color:var(--text)}
#article .vsw-find input:focus{border-color:var(--accent);box-shadow:0 0 0 2px rgba(242,182,50,.25)}
#article .vsw-find .vsw-cnt{color:var(--muted)}
#article .vsw-back a{border-color:var(--line2);color:var(--text)}
#article .vsw-back a:hover{background:#1A1A1F;color:var(--accent)}

/* Timetable (ttable.php / ttablelive.php) screen view - the print view is separate and stays white */
#article .dsevt td{background:#222228 !important;border-top:2px solid var(--line2) !important;color:var(--text)}
#article .dsbreak td{background:#1A1A2A !important;color:var(--text)}
#article .dsheat td{background:#1C1C24 !important;border-top:1px solid var(--line2) !important;color:var(--text)}
#article .dsrow td{border-bottom:1px solid var(--line)}
#article .dsprint{background:transparent !important;border-color:var(--line2) !important;color:var(--text) !important}
#article .dsprint:hover,#article .dsprint:focus{border-color:var(--accent) !important;color:var(--accent) !important}
#article .dslang{display:none}
/* ttable.php / ttablelive.php write their row colours inline on each <tr>/<td>
   (#fff competitor and gap rows, #ccc event rows, #ccf break rows, #eee rules),
   which beat the stylesheet unless overridden here */
#article tr[style*="background-color:#fff"]{background:transparent !important}
#article tr[style*="background-color:#ccc"]{background:#222228 !important}
#article tr[style*="background-color:#ccf"]{background:#1A1A2A !important}
#article td[style*="solid #eee"]{border-bottom:1px solid var(--line) !important}
#article .dsrow td,#article .dscomp,#article .dsnum,#article td small{color:var(--text)}
#article .dsrow td{padding-top:8px;padding-bottom:8px}
#article tr.dsgap td{height:10px;padding:0;border:0}
/* the two empty cells at the start of competitor rows, and the gap rows, take no divider */
#article tr[style*="background-color:#fff"] td:not([style]){border-bottom:0 !important;background:transparent !important}
#article tr[style*="background-color:#fff"]:hover td{background:transparent !important}

/* Video pages */
#article .video-wrap{max-width:none}
#article .video-ratio{border-radius:12px;overflow:hidden}

/* Old helper classes and images the inner pages still use */
.rounded{border-radius:14px}
#article img{max-width:100%;height:auto}

@media (max-width:640px){
#content{padding:16px 16px 32px;gap:20px}
#article,#article_noscroll{padding:16px 14px;border-radius:12px}
#article_title{font-size:26px}
.ev-strip img{height:44px}
.ev-strip-t{font-size:18px}
#viewtable td{padding:10px 6px}
}
@media print{
.top,.ev-strip,#side,#footer{display:none !important}
body,#content,#article{background:#fff !important;color:#000 !important;border:0 !important}
#article *{color:#000 !important}
}
