/* Techscore Clone — faithfully reproduced from scores.collegesailing.org/inc/css/style.css */

.tr-rotation-table img,.teamscorelist img{height:20px;width:auto;}
.burgee-cell img,.burgeecell img{height:40px;width:auto;}
.totalrow .burgee-cell img{height:30px;}
.teamranking img{height:40px;width:auto;}
a img{border:none;}
.noshow{font-style:italic;}
.schools-table{width:100%;}
.schools-table th,.schools-table td{text-align:left;padding:0.25em 0.5em;}
.schools-table .burgeecell{width:70px;text-align:center;}
.schools-table .schoolname{font-weight:bold;}

/* ---- REGATTA RESULTS TABLES ---- */
.results td.tiebreaker{width:0.5em;padding:0;}
.results td.burgee-cell,.results th.burgee-cell{width:70px;text-align:center;border:none;}
.results td.schoolname{text-align:left;}
.results td.teamname,.results th.teamname{text-align:left;}
.results td.total{text-align:right;}
.results td.totalcell{font-weight:bold;text-align:right;background:#f3ebe0;}
.teamranking td,.teamranking th{text-align:center;}
.teamranking td.schoolname,.teamranking td.teamname{text-align:left;}
td.tiebreaker{width:4px;padding:0;border:none;}

/* ---- SCHOOL CARDS ---- */
.school-cards{display:flex;flex-wrap:wrap;gap:0.75em;padding:0.5em 0 1em;justify-content:center;}
a.school-card{
  display:flex;flex-direction:column;align-items:center;
  width:8em;padding:0.6em 0.4em;border:1px solid #ddd;border-radius:0.4em;
  background:#faf8f4;text-decoration:none;color:#222;
  transition:background 0.15s,border-color 0.15s;
}
a.school-card:hover{background:#F2EDE6;border-color:#aaa;}
a.school-card img{height:40px;width:auto;margin-bottom:0.4em;}
.school-card-name{font-size:0.75em;font-weight:bold;text-align:center;line-height:1.2em;}
.school-card-loc{font-size:0.7em;color:#777;text-align:center;margin-top:0.2em;}

/* ---- SCREEN STYLES ---- */
@media screen {
  .nav{display:none;}
  html{height:100%;}
  body{
    display:table;width:100%;height:100%;margin:0 auto;
    font-family:"Lucida Grande",Tahoma,Verdana,sans-serif;
    line-height:1.25em;padding:0;
  }
  a{color:#3465A4;}
  svg{display:block;}

  /* Coming regattas */
  .coming-regattas thead{display:none;}
  .coming-regattas{background:#f2ede6;border:1px solid #aaa;border-radius:0.5em;}
  .coming-regattas *{border:none;padding:0.5em;text-align:left;}
  .coming-regattas tr td:first-child{text-align:right;}

  /* Message container / welcome + in-progress layout */
  #message-container{display:table;max-width:65em;margin:0 auto;border-spacing:1em;}
  #welcome,#in-progress,#flickrwrap{
    background:#F2EDE6;border:1px solid #ddd;margin:0 0.5em;
    text-align:left;display:table-cell;padding:0 1em;width:40%;vertical-align:top;
  }
  #welcome .figure{text-align:center;}
  .issa-cta{text-align:center;margin-top:1em;}
  .issa-button{
    display:inline-flex;align-items:center;padding:0.5em 1em;
    background:#1a3a5c;color:#fff;border:2px solid #1a3a5c;border-radius:0.3em;
    text-decoration:none;font-weight:bold;font-size:0.95em;
    transition:background 0.15s,color 0.15s;
  }
  .issa-button:hover{background:#fff;color:#1a3a5c;}
  #flickrwrap{text-align:center;}
  iframe{overflow:hidden;border:none;display:block;margin:0 auto;}

  /* H1 */
  h1{
    display:table;width:auto;margin:0 auto;padding:0.5em;border-spacing:0;
    font-family:Arial,Helvetica,sans-serif;font-weight:bold;letter-spacing:0.1em;
    font-variant:small-caps;color:#48484A;text-align:center;
    background:#f7f7f7;border:1px solid #ddd;border-radius:0.25em;
    font-size:160%;position:relative;top:-0.75em;
  }
  #message-container span{display:table-cell;}
  #message-container p{margin-top:0;margin-bottom:1em;}
  #in-progress,#flickrwrap{width:60%;}
  #in-progress table{width:auto;margin-top:-1em;}
  #in-progress thead{display:none;}
  #in-progress td{border-bottom:1px dotted #aaa;}
  #in-progress tr:last-child td{border-bottom:none;}
  #in-progress tr td:first-child{text-align:right;}

  /* Social */
  #social-wrapper > div{display:inline-block;width:auto;margin:0 0.5ex;}
}

/* ---- WIDESCREEN (≥800px) ---- */
@media screen and (min-width:800px) {
  body{background:#6C6D6F;}
  #page-header{background:white;}
  #menu-wrapper{border-bottom:1px solid #ddd;border-top:1px solid #ddd;}
  #menu{
    max-width:60em;min-width:35em;margin:0 auto;
    list-style-type:none;padding:0.5em 0;display:table;width:100%;
  }

  /* Menu items */
  #menu li{
    font-family:Arial,Helvetica,sans-serif;
    text-transform:uppercase;font-size:0.7em;letter-spacing:0.12em;
    font-stretch:condensed;font-weight:bold;
    border-right:1px solid #ddd;display:table-cell;
    text-align:center;vertical-align:middle;padding:0 2em;min-width:6em;
  }
  #menu li:last-child{border-right:none;}
  li#logo{width:8em;border-right:none;position:relative;}
  li#logo img{position:absolute;margin-left:-50px;top:-0.75em;border:none;}
  li#logo + li{position:relative;}
  li#logo + li::before{
    content:'';position:absolute;left:3.5em;top:0;height:100%;
    border-left:1px solid #ddd;
  }
  #menu a{color:#222;text-decoration:none;}
  #menu a:hover{color:#888;}

  /* Content header (regatta title area) */
  #content-header{
    background:#F2EDE6;border:1px solid #ddd;margin:1.8em auto 0;
    text-align:center;max-width:50em;
  }
  #content-header h1{
    display:table;width:auto;margin:0 auto;padding:0.5em;
    font-family:Arial,Helvetica,sans-serif;font-weight:bold;letter-spacing:0.1em;
    font-variant:small-caps;color:#48484A;text-align:center;
    background:#f7f7f7;border:1px solid #ddd;border-radius:0.25em;
    font-size:160%;position:relative;top:-0.75em;
  }
  #content-header span{display:table-cell;line-height:2ex;}
  #left-fill,.left-fill{
    width:90px;height:15px;
    background:url('img/left-fill.svg');
    background-repeat:no-repeat;vertical-align:middle;
  }
  #right-fill,.right-fill{
    width:90px;height:15px;
    background:url('img/right-fill.svg');
    background-repeat:no-repeat;vertical-align:middle;
  }

  /* Page info (regatta metadata list) */
  #page-info{
    font-size:0.9em;color:#555;margin:-1em 0 0.5em;width:100%;
    border-collapse:collapse;border:none;padding:0;
    list-style-type:none;display:table;
  }
  #page-info li{display:table-row;border-bottom:1px solid #ddd;}
  #content-header .page-info-key{line-height:2em;padding:0 1%;text-align:right;width:45%;}
  .page-info-value{font-weight:bold;padding:0.25em;text-align:left;}
  #page-info tbody{border:none;}
  #page-info th{text-align:right;font-weight:normal;font-size:90%;width:45%;padding:0.25em 1em;border:none;}
  #page-info td{text-align:left;font-weight:bold;border:none;}
  #page-info tr{border-bottom:1px solid #ddd;}
  #page-info tr:last-child{border-bottom:none;}

  /* Main page content */
  #page-content{background:white;padding:3.5em 0 2em;vertical-align:top;}

  /* Footer */
  #page-footer{padding:0;margin:0;height:12em;}
  #page-footer h3{
    font-size:0.7em;color:white;text-transform:uppercase;
    letter-spacing:0.1em;font-family:Arial,Helvetica,sans-serif;margin-bottom:0;
  }
  #sponsors{max-width:60em;list-style-type:none;margin:0 auto;padding:0;}
  #sponsors li{display:inline-block;vertical-align:middle;margin:0 0.5em;}
  #sponsors img{border:none;}
  #sponsors-list{padding:0;}
  address{
    border-top:1px solid #888;max-width:74em;margin:0 auto;
    color:#ccc;font-size:0.8em;text-align:right;
  }
  address a{color:#ccc;text-decoration:none;}

  /* Port (section wrapper) */
  .port{min-width:50em;display:table;width:100%;max-width:65em;margin:auto;padding:0 1ex;position:relative;box-sizing:border-box;}
  .port p{max-width:50em;}

  /* Port section headers (h3 used for "Coming soon", "Season regattas", etc.) */
  .port h3{
    text-align:center;text-transform:uppercase;
    font-family:Arial,Helvetica,sans-serif;font-size:0.75em;letter-spacing:0.12em;
    color:#555;margin:1em 0 0.5em;border-bottom:1px solid #ddd;padding-bottom:0.4em;
  }
}

/* ---- TABS ---- */
.tabs{display:flex;flex-wrap:wrap;gap:0.35em;margin-top:1.2em;margin-bottom:0.6em;justify-content:center;}
.tab-btn{padding:0.55em 1.4em;border:1px solid #bbb;background:#f5f5f5;cursor:pointer;font-size:1em;border-radius:4px 4px 0 0;font-family:inherit;}
.tab-btn:hover{background:#e8e8e8;}
.tab-btn.active{background:white;border-bottom-color:white;font-weight:bold;}
.tab-panel{display:none;}
.tab-panel.active{display:block;}

/* ---- TABLES ---- */
table{border-spacing:0px;border-collapse:collapse;font-size:0.9em;margin:1em auto;}
table td{border:1px solid #bbbbbb;text-align:right;margin:0px;padding:0.25em;}
table th{border:1px solid #bbbbbb;text-align:right;min-width:2.25em;padding:0 0.25em;font-size:90%;}
table thead{
  background:#eae5d6;
  border:1px solid #bbbbbb;height:20px;color:black;
}
table tbody{border:1px solid #bbbbbb;}
.totalrow,.totalcell{
  background:#f3ebe0;color:#333;font-weight:bold;
}
tr.totalrow td{border-bottom:1px solid #888;}
tr.topborder td{border-top:1px solid #bbb;}
td.races{text-align:left;font-size:95%;color:#555;padding-left:0.5em;}
.row1{background:#F2EDE6;}
td.schoolname,td.teamname,th.teamname{text-align:left;}
td.noborder,th.noborder,tr.noborder{border:none;}
colgroup{border-right:1px solid #bbbbbb;}
td.total{color:black;}

/* Season summary table (the main regatta listing table) */
.season-summary tbody th{text-align:center;padding:0.5em;background:#E6E0D3;}
.season-summary th,.participation-table th{text-align:left;}
.participation-table tbody,.season-summary tbody{border:none;}
.participation-table td,.season-summary td{text-align:left;border:none;padding:0.5em;}
.season-summary,.participation-table{width:100%;}
.season-summary img{height:40px;width:auto;}
/* Homepage: widen Name (col 1) and Type (col 3) */
#in-progress .season-summary td:nth-child(1),
#in-progress .season-summary th:nth-child(1){width:38%;}
#in-progress .season-summary td:nth-child(3),
#in-progress .season-summary th:nth-child(3){width:20%;}

/* Other seasons submenu */
#submenu-wrapper{border-top:1px solid #ddd;border-bottom:1px solid #ddd;padding:0.5em 0;margin-top:1em;}
#other-seasons{list-style-type:none;display:block;max-width:60em;margin:0 auto;padding:0;}
#other-seasons li{
  text-align:center;display:inline-block;border-right:1px solid #ddd;padding:1em;
  font-family:Arial,Helvetica,sans-serif;font-size:0.7em;letter-spacing:0.1em;
  text-transform:uppercase;font-weight:bold;width:5em;height:3em;vertical-align:middle;
}
#other-seasons li:last-child{border-right:none;}
#other-seasons a{color:#222;text-decoration:none;}
#other-seasons a:hover{color:#888;text-decoration:underline;}

/* Top wrapper (timestamp + social) */
#top-wrapper{display:table;width:100%;max-width:60em;margin:0 auto;}
#search-wrapper{display:table-cell;width:30%;}
#last_updated{
  font-family:sans-serif;font-size:0.8em;color:#888;
  margin:0 auto;padding:0.5em 0;display:table-cell;
  vertical-align:middle;width:25ex;
}
#social{padding:0.5em 0;vertical-align:middle;display:table-cell;}
#social a{margin-right:0.5em;}

/* ---- MOBILE (≤799px) ---- */
@media screen and (max-width:799px) {
  html{background:none;font-size:11pt;}
  body{background:none;display:block;}
  a{text-decoration:none;}
  #last_updated{display:none;}
  #menu-wrapper{border:none;}
  #menu{
    font-size:10pt;display:block;max-width:100%;padding:0;
    position:relative;min-width:20ex;width:auto;margin:0;text-align:center;
  }
  #menu li{
    display:inline-block;padding:0 2ex;text-align:center;
    border:none;border-bottom:1px solid #ddd;background:rgba(255,255,255,0.8);
  }
  #menu li a{display:block;padding:1ex;}
  li#logo{left:0;top:0;position:absolute;text-align:left;border:none;width:20ex;z-index:-1;padding:0;}
  li#logo img{margin:0;position:static;top:0;width:20ex;height:auto;}
  #top-wrapper{display:table;width:100%;}
  #page-footer{height:auto;background:#6C6D6F;}
  .port{min-width:10em;}
  table th{min-width:0.25em;}
  #social{display:table-cell;height:20px;text-align:center;width:18ex;}
  #search-wrapper{display:table-cell;width:auto;height:35px;}
  #page-content{padding-top:1.5em;}
  #message-container{display:block;}
  #welcome,#in-progress{display:block;width:95%;margin:0 auto;}
  #welcome{margin-bottom:3em;font-size:90%;}
  #other-seasons{text-align:center;}
  #other-seasons li{display:inline-block;width:8em;}
  #other-seasons a{display:block;width:8em;padding:0.5em 0;}
  h3{margin:1ex;font-size:90%;}
  .season-summary,.participation-table{text-align:center;}
  .season-summary thead,.participation-table thead{display:none;}
  .season-summary tr.row0,.season-summary tr.row1,.participation-table tr.row0,.participation-table tr.row1{
    margin:0.25em;display:inline-block;width:25ex;vertical-align:top;
    border:1px solid #ccc;border-radius:0.25em;
  }
  .season-summary td,.participation-table td{display:block;width:100%;margin-left:1em;padding:0.3ex 0.5ex;white-space:normal;}
  .season-summary tbody th{display:block;width:100%;padding:0.5em 0;}
  .season-summary tr td:first-child,.participation-table tr td:first-child{margin-left:0;font-size:110%;font-weight:bold;}
  .coming-regattas{background:none;border:none;}
  .coming-regattas tbody{text-align:center;}
  .coming-regattas td{display:block;padding:0.25ex 0.5ex;background:#f2ede6;}
  .coming-regattas tr td:first-child{text-align:left;font-size:110%;font-weight:bold;}
  .coming-regattas tr{
    border:1px solid #CCCCCC;border-radius:3px;
    box-shadow:0 -1px 3px 3px #888888 inset;
    display:inline-block;font-size:95%;margin:0.5ex;padding:0;vertical-align:top;width:20ex;
  }
  .coming-regattas a{padding:0;text-decoration:none;}
  #in-progress table{width:100%;}
  #in-progress tr{
    background:rgba(255,255,255,0.3);border-radius:3px;
    border:1px solid white;display:inline-block;margin:5px;min-width:20ex;vertical-align:top;width:48%;
  }
  #in-progress a{text-decoration:none;}
  #in-progress tr td:first-child{text-align:left;font-size:110%;font-weight:bold;}
  #in-progress td{border-bottom:none;}
}

/* ---- PRINT ---- */
@media print {
  html{font-size:10pt;}
  body,#left-fill,#right-fill{background:none;}
  a{color:black;text-decoration:none;border:none;}
  .nav,#page-header,#submenu-wrapper,#welcome,#flickwrap,#social-wrapper{display:none;}
  #page-content{padding-top:1.5em;}
  table{page-break-inside:auto;}
  tr{page-break-inside:avoid;page-break-after:auto;}
  table *{font-family:monospace;}
  #content-header table *{border:none;}
  thead{display:table-header-group;background-color:#ccc;}
}
/* ---- Roster table ---- */
.roster-table{width:auto;margin:0 auto;}
.roster-table td.sailor-name{text-align:left;font-weight:bold;}
.roster-table td.sailor-year{text-align:right;color:#555;}
.roster-by-class{display:block;white-space:nowrap;overflow-x:auto;font-size:0;text-align:center;}
.roster-class-group{display:inline-block;vertical-align:top;white-space:normal;margin-right:1.5em;margin-bottom:1em;font-size:1rem;}
.roster-class-group h4{text-align:center;margin-bottom:0.4em;font-size:0.95em;color:#555;letter-spacing:0.05em;text-transform:uppercase;}

.badge{display:inline-block;padding:0.15em 0.5em;border-radius:3px;font-size:0.8em;font-weight:bold;letter-spacing:0.03em;}
.badge-icsa{background:#1a4f8a;color:#fff;}
.badge-issa{background:#2a7a3b;color:#fff;}

/* Rotation tab */
table.rotation{border-collapse:collapse;font-size:0.88em;margin-bottom:1.5em;width:auto;}
table.rotation thead{background:#eae5d6;border:1px solid #bbbbbb;height:20px;color:black;}
table.rotation thead th{text-align:center;padding:0 0.25em;font-size:90%;border:1px solid #bbbbbb;min-width:2.25em;white-space:nowrap;}
table.rotation thead th:nth-child(2){text-align:left;min-width:12em;}
table.rotation tbody *{border:none;}
table.rotation tbody td{padding:0.25em;text-align:center;}
table.rotation tbody td.teamname{text-align:left;white-space:nowrap;padding-left:0.4em;}
table.rotation tbody td.burgee-cell{padding:0.1em 0.3em;}
table.rotation tbody td.sail{min-width:2.25em;}
table.rotation tbody tr.row0{background:#fff;}
table.rotation tbody tr.row1{background:#F2EDE6;}
