/* ========== FONTS ========== */

@font-face {
  font-family: 'Atkinson Next';
  src: url('/static/fonts/Atkinson_Next/AtkinsonHyperlegibleNext-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Atkinson Next';
  src: url('/static/fonts/Atkinson_Next/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Atkinson Next';
  src: url('/static/fonts/Atkinson_Next/AtkinsonHyperlegibleNext-RegularItalic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
}

/* ========== CSS ========== */

html {
  font-family: 'Atkinson Next', sans-serif;
  font-size: min(calc(10px + 0.8vw), 1em);
  background: #eee;
  padding: 1rem;
}

body {
  max-width: 960px;
  margin: 0 auto;
  background: white;
}

h1, h2, h3, h4, h5, h6 {
  color: #3bf;
  margin: 1rem 0;
}

a {
  color: #377ba8;
}

hr {
  border: none;
  border-top: 1px solid lightgray;
}

{
  background: lightgray;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
}

.container {
    display: flex;
    justify-content: space-between;
    gap: 1em;
}
.column {
    flex: 1;
    margin: 0;
    border: 0;
    font-size: min(calc(10px + 0.8vw), 0.75em);
}



/* ----------------------- */
/* NAVBAR */
/* ----------------------- */
nav p  {
  flex: auto;
  padding: 1rem 1rem 0rem;
}

nav p a {
  text-decoration: none;
  color: #3bf;
  font-weight: bold;
  font-size: 1.5em;
}

nav ul  {
  display: flex;
  flex-wrap: wrap;
  list-style-type: none;
  overflow: hidden;
  background-color: #3bf;
  font-weight: bold;
  margin: 0;
  padding: 0;
}

nav ul li a, .menulabel {
  display: block;
  color: white;
  text-align: center;
  padding: 1rem 1rem;
  text-decoration: none;
}

nav ul li a:hover, .menulabel:hover {
  background-color: #dff;
  color: #3bf;
}

/*nav ul li a.active {background-color: #04AA6D;}*/

nav ul li.right {float: right;}

/*Dropdown menu*/
.menulabel{
  position:relative;
  display:block;
  cursor:pointer;
}

.menulabel:after{
  content:"";
  position:absolute;
  display:block;
  top:43%;
  right:5%;
  width:0;
  height:0;
  border-top:4px solid #fff;
  border-bottom:0 solid #fff;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  }

.menulabel:hover:after{
  content:"";
  position:absolute;
  display:block;
  top:43%;
  right:5%;
  width:0;
  height:0;
  border-top:4px solid #3bf;
  border-bottom:0 solid #3bf;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  }

.menucheck:checked ~ .menulabel:after{
  border-top:0 solid #3bf;
  border-bottom:4px solid #3bf;
}

.menucheck:checked ~ .menulabel {
  background-color: #dff;
  color: #3bf;
}

.menucheck{display:none}

.submenu{
  display: none;
  flex-wrap: wrap;
  list-style-type: none;
}

.menucheck:checked ~ .submenu, .menulabel:hover ~ .submenu, .submenu:hover {
  transition:max-height 0.5s ease-in;
  display: flex;
  flex-flow: column wrap;
  list-style-type: none;
  overflow: hidden;
  background-color: #3bf;
  font-weight: bold;
  transition:max-height 0.5s ease-out;
  position:absolute;
}

.submenu li a {
  color: white;
  text-align: left;
  padding: 1rem 1rem;
  text-decoration: none;
}

.submenu li a:hover {
  background-color: #dff;
  color: #3bf;
}



/* ----------------------- */
/* FOOTER */
/* ----------------------- */
footer {
  background: #3bf;
  color: white;
  text-align: center;
  text-align: center;
}

footer a {
  text-decoration: none;
  color: white;
}

footer a:hover:not(.active) {
  color: black;
  text-decoration: underline; 
}



/* ----------------------- */
/* CONTENT */
/* ----------------------- */
.content {
  padding: 0 1rem 1rem;
}

.content > header {
  border-bottom: 1px solid lightgray;
  display: flex;
  align-items: flex-end;
}

.content > header h1 {
  flex: auto;
  margin: 1rem 0 0.25rem 0;
}

.flash {
  margin: 1em 0;
  padding: 1em;
  background: #cae6f6;
  border: 1px solid #377ba8;
}


.content form {
  margin: 0em 0;
  display: flex;
  flex-direction: column;
}

.content label {
  margin-bottom: 0.5em;
}

.content textarea {
  min-height: 12em;
  resize: vertical;
  margin-bottom: 1em;
}

/* ----------------------- */
/* FORM INPUTS */
/* ----------------------- */
/* select2 refers to select2 boxes */
/* text-input refers to score input */
.select2, .text-input {
  width: 50% !important;
  height: 2.4375em !important;
}
.select2-selection--single, .select2-selection__rendered, .select2-selection__arrow,
.select2-selection__clear
{
  height: 2.4375em !important;
}
.text-input {
  display: block;
  font-family:inherit;
  font-size:inherit;
  box-sizing: border-box;
  padding: 0 8px 0;
}
.text-input, .select2-selection--single {
  box-shadow: inset 0 1px 2px rgba(10,10,10,.1) !important;
  border: 1px solid #aaa !important;
  border-radius: 4px !important;
}
.text-input:hover, .select2-selection--single:hover {
  outline: 2px solid #3bf !important;
}
.text-input:focus, .select2:focus {
  outline: none !important;
}

.select2-selection__placeholder, .select2-selection__rendered {
  line-height: 2.4375em !important;
}

input.danger {
  color: #cc2f2e;
}

input[type=submit] {
  padding: 0.25rem;
  align-self: start;
  min-width: 10em;
  background-color: #3bf;
  color: white;
  border-radius: 0.5rem;
  box-shadow: 0px;
  margin-bottom: 1em;
}

input[type=submit]:hover {
  background-color: #4cf;
}

input[type=checkbox] {
    vertical-align:middle;
}

label:not(.menulabel) {
    width: 100%;
    vertical-align: middle;
}
/* ----------------------- */
/* TABLES */
/* ----------------------- */

table{
  table-layout: auto;
  border-collapse: collapse;
}

th, td {
    border: None;
    overflow-wrap: break-word;
    overflow: hidden;
    height: min(calc(12px + 0.8vw), 2em);
}

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

.column {
  padding: 1%;
}


/* Handicap Table*/
.hctable {
  text-align: right;
  font-size: min(calc(6px + 0.8vw), 1em);
}

.hctable th, .hctable td{
  width: 10vw;
  padding-left: 10px
}

.hctable th:first-child, .hctable td:first-child {
  font-weight: bold;
  text-align: center;
}

/* Set header shading, and alternate shading each row */
.classtable th,
.hctable th,
.comparetable th,
.distancetable th,
.eventtable th {
  background-color: #D9D9D9;
}
.classtable tbody tr:nth-child(even),
.hctable tbody tr:nth-child(even),
.comparetable tbody tr:nth-child(even),
.distancetable tbody tr:nth-child(even),
.eventtable tbody tr:nth-child(even) {
  background-color: #EEEEEE;
}


/* Classification and EventClassification Table */
.classtable, .eventtable, .fieldtable {
  width: 100%;
  text-align: center;
  font-size: min(calc(5px + 0.8vw), 1em);
}

.classtable th:nth-child(10n+1), .classtable td:nth-child(10n+1),
.eventtable th:first-child, .eventtable td:first-child,
.fieldtable th:first-child, .fieldtable td:first-child {
  white-space: nowrap;
  font-weight: bold;
  text-align: right;
  padding-right: 0.5em;
}

/* Fancy Formatting for classification Tables
 * Color each class a different colour
 * Headers are darker than bulk of table
 * Alternate shade line-by-line
*/
/* Archer Class - blue */
.classtable th:nth-child(n+2):nth-child(-n+4),
.classtable th:nth-child(n+12):nth-child(-n+14),
.eventtable th:nth-child(n+3):nth-child(-n+5){
    background-color: #5D69D8;
    color: #FFFFFF;
}
.classtable tr:nth-child(odd) td:nth-child(n+2):nth-child(-n+4):not(:empty),
.classtable tr:nth-child(odd) td:nth-child(n+12):nth-child(-n+14):not(:empty),
.eventtable tr:nth-child(odd) td:nth-child(n+3):nth-child(-n+5):not(:empty){
    background-color: #A1AFFF;
}
.classtable tr:nth-child(even) td:nth-child(n+2):nth-child(-n+4):not(:empty),
.classtable tr:nth-child(even) td:nth-child(n+12):nth-child(-n+14):not(:empty),
.eventtable tr:nth-child(even) td:nth-child(n+3):nth-child(-n+5):not(:empty){
    background-color: #919FEE;
}
/* Bowman Class - red */
.classtable th:nth-child(n+5):nth-child(-n+7),
.classtable th:nth-child(n+15):nth-child(-n+17),
.eventtable th:nth-child(n+6):nth-child(-n+8){
    background-color: #C75D6B;
    color: #FFFFFF;
}
.classtable tr:nth-child(odd) td:nth-child(n+5):nth-child(-n+7):not(:empty),
.classtable tr:nth-child(odd) td:nth-child(n+15):nth-child(-n+17):not(:empty),
.eventtable tr:nth-child(odd) td:nth-child(n+6):nth-child(-n+8):not(:empty){
    background-color: #E0A2AB;
}
.classtable tr:nth-child(even) td:nth-child(n+5):nth-child(-n+7):not(:empty),
.classtable tr:nth-child(even) td:nth-child(n+15):nth-child(-n+17):not(:empty),
.eventtable tr:nth-child(even) td:nth-child(n+6):nth-child(-n+8):not(:empty){
    background-color: #D0929B;
}
/* Master Bowman Class - grey */
.classtable th:nth-child(n+8):nth-child(-n+10),
.classtable th:nth-child(n+18):nth-child(-n+20),
.eventtable th:nth-child(n+9):nth-child(-n+11){
    background-color: #D9D9D9;
}
.classtable tr:nth-child(odd) td:nth-child(n+8):nth-child(-n+10):not(:empty),
.classtable tr:nth-child(odd) td:nth-child(n+18):nth-child(-n+20):not(:empty),
.eventtable tr:nth-child(odd) td:nth-child(n+9):nth-child(-n+11):not(:empty){
    background-color: #E7E7E7;
}
.classtable tr:nth-child(even) td:nth-child(n+8):nth-child(-n+10):not(:empty),
.classtable tr:nth-child(even) td:nth-child(n+18):nth-child(-n+20):not(:empty),
.eventtable tr:nth-child(even) td:nth-child(n+9):nth-child(-n+11):not(:empty){
    background-color: #D7D7D7;
}


/* Event Classification Table */
.eventtable th:nth-child(2), .eventtable td:nth-child(2) {
  text-align: left;
  padding-left: 10px
}


/* Comparison Tables */
.comparetable {
  box-sizing: border-box;
  text-align: left;
  font-size: min(calc(5px + 0.8vw), 1em);
}
.comparetable td {
}
.comparetable td:first-child {
  padding-right: 20px;
}
.comparetable td:nth-child(2) {
  text-align: right;
}


/* Distance Table */
.distancetable {
  box-sizing: border-box;
  text-align: left;
  font-size: min(calc(8px + 0.8vw), 2em);
}
.distancetable td {
  text-align: right;
}
.distancetable td:first-child {
  padding-right: 30px;
}


/* Classification Information Table */
.infoclasstable {
  width: 96%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: min(calc(6px + 0.8vw), 1em);
}

.infoclasstable th, .infoclasstable td{
  border: 1px solid black;
}

.infoclasstable tbody tr{
  height: 100px;
}

.infoclasstable th:nth-child(2), .infoclasstable td:nth-child(2){
 width: 20%;
}

/* Apply colouring */
.infoclasstable th{
    background-color: #C60029;
    color: #FFFFFF;
}
/* Set colours: Archer, Bowman, MB */
.infoclasstable tr:nth-child(1) td:nth-child(1),
.infoclasstable tr:nth-child(2) td:nth-child(1),
.infoclasstable tr:nth-child(3) td:nth-child(1) {
    background-color: #15224A;
    color: #FFFFFF;
    border-top: 1px solid #FFFFFF;
    font-weight: bold;
}
.infoclasstable tr:nth-child(1) td:nth-child(1),
.infoclasstable tr:nth-child(2) td:nth-child(1) {
    border-bottom: 1px solid #FFFFFF;
}
.infoclasstable tr:nth-child(1) td:nth-child(2) {
    background-color: #5D69D8;
    color: #FFFFFF;
}
.infoclasstable tr:nth-child(2) td:nth-child(2) {
    background-color: #C75D6B;
    color: #FFFFFF;
}
.infoclasstable tr:nth-child(3) td:nth-child(2) {
    background-color: #D9D9D9;
}


/* Field Rounds Information Table */
.fieldroundtable {
  width: 40%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: min(calc(6px + 0.8vw), 1em);
}
.fieldroundtable th, .fieldroundtable td{
  border: 1px solid black;
}
.fieldroundtable tr:nth-child(n+1):nth-child(-n+4) td {
    background-color: #EE0000;
    color: #FFFFFF;
}
.fieldroundtable tr:nth-child(n+5):nth-child(-n+8) td {
    background-color: #0000EE;
    color: #FFFFFF;
}
.fieldroundtable tr:nth-child(n+9):nth-child(-n+12) td {
    background-color: #EEEE00;
}




/* Printing */

.class-table-header {
    display: flex;
    justify-content: space-between; /* Space between the h2 and the image */
    align-items: center;            /* Align items vertically centered */
    padding: 10px;                  /* Optional padding */
}

.text-container {
    display: flex;
    flex-direction: column; /* Stack h2 and h3 vertically */
}

.class-table-header h2,
.class-table-header h3 {
    margin: 0; /* Remove default margin */
}

.class-table-header img {
    width: 20%; /* Adjust as needed */
    height: auto;     /* Maintain aspect ratio */
}

.table-cover img {
    height: 0;
    visibility: hidden;
}

.table-cover .faded-image {
    width: 50%; /* Double the width to ensure 50% is shown */
    height: auto;
    position: absolute;
    top: 15%;
    left: 75%; /* Shift the image to the left */
    opacity: 0.25;
}

@media print {
    @page {
        size: landscape;
    }
    html {
      font-family: sans-serif;
      font-size: min(calc(10px + 0.8vw), 1em);
      background: white;
      color: #333333;
    }
    {
      background: white;
      display: flex;
      align-items: center;
      padding: 0;
    }
    h1, h2, h3, h4, h5, h6 {
      color: #333333;
    }
    h2 {
      padding-top: 3em
    }
    body {
        width: 100%;
        background: white;
    }
    .pagebreak {
        clear: both;
        page-break-after: always;
    }

    /* Style for the centered item */
    .table-cover {
        height: 80vw;            /* Full viewport height */
        width: 100%;             /* Full viewport width */
        text-align: left;        /* Center text */
        font-size: 3em;
    }
    .title {
        position: absolute;
        top: 65%;
        left: 5%;
    }
    .table-cover h1 {
          padding: 0;
          color: #C60029;
        }
    .table-cover h2, .table-cover h3 {
          padding: 0;
          color: #15224A;
        }
    .table-cover img {
        height: 10%;
        position: absolute;
        top: 85%;
        left: 5%; /* Shift the image to the left */
        visibility: visible;
    }
    .tablename {
        position: absolute;
        bottom: 2%;
        left: 50%; /* Center horizontally */
        transform: translateX(-50%); /* Adjust for centering */
        justify-content: center; /* Center text horizontally */
        text-align: center;      /* Center text within the div */
        font-size: 1em;
    }
    .rectangle {
        transform: skew(25deg);     /* Skew the rectangles */
        transform-origin: top left;  /* Set the origin for the skew transformation */
    }
    .blue-rectangle {
        position: absolute;
        top: 0;
        left: 25%; /* Center horizontally */
        background-color: #15224A;
        width: 25%;
        height: 50%;
    }
    .red-rectangle {
        position: absolute;
        top: 0;
        left: 40%; /* Center horizontally */
        background-color: #C60029;
        width: 35%;
        height: 65%;
        opacity: 0.75;
    }
}
