:root {
  --header-height: 80px;
  --time-column-width: 50px;
  --hour-height: 40px;
  --session-color: #4CAF50;
  --row-height: 50px; 
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local(''),
       url('/fonts/roboto-v29-latin-regular.woff2') format('woff2'),
       url('/fonts/roboto-v29-latin-regular.woff') format('woff'); 
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local(''),
       url('/fonts/roboto-v29-latin-700.woff2') format('woff2'), 
       url('/fonts/roboto-v29-latin-700.woff') format('woff');
}

html, body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  background: #FAF9F6;
  min-height: 100vh;
  font-size: 1em;
}

.content-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}
@media (min-width: 600px) {
  .content-container {
    max-width: 720px;
    padding: 0 24px;
  }
}
@media (min-width: 992px) {
  .content-container {
    max-width: 1280px;
    padding: 0 24px;
  }
}

.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #FAF9F6;
  color: #000;
  z-index: 100;
  box-shadow: 0 0 0.2em rgba(170,170,170,0.2);
  display: flex;
  align-items: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 2em;
}

.burger {
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.burger-line {
  position: absolute;
  width: 100%;
  height: 3px;
  background: #0074d9;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(.86,0,.07,1);
}
.burger-line:nth-child(1) { top: 0; }
.burger-line:nth-child(2) { top: 10px; }
.burger-line:nth-child(3) { top: 20px; }
.burger.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}
.burger.active .burger-line:nth-child(2) {
  opacity: 0;
}
.burger.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.menu-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: transparent;
  color: white;
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}
.menu-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.menu-container {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
}

.menu-element {
  position: absolute;
  top:0;
  right: 0;
  min-width: 200px;
  background: #0074d9;
}

.menu-element span {
	padding: 10px 20px;
	font-size: 1.2em;
	font-weight: 700;
}

a.menu {
	color: #FAF9F6;
}

.main-content {
  margin-top: calc(var(--header-height) + 40px);
  padding: 0;
}
.box {
  padding: 0 20px;
  box-sizing: border-box;
  margin-bottom: 40px;
}

.tabsman {
  display: flex;
  flex-wrap: wrap;
  margin: 2em auto;
  position: relative;
}

.tabsman input[type="radio"] {
  display: none;
}

.tabsman label {
  z-index: 2;
}

.tabsman label.button {
	margin-right: 10px;
}

.tabsman input[type="radio"]:checked + label {
  font-weight: bold;
  z-index: 3;
}

.tabsman .tab-content {
  display: none;
  width: 100%;
  position: absolute;
  top: 3.5em;
  left: 0;
  z-index: 1;
}

.tabsman input[type="radio"]:checked + label + .tab-content {
  display: block;
}

@media (max-width: 600px) {
  .tabsman label {
    padding: 0.8em;
    font-size: 1em;
  }
  .tabsman .tab-content {
    padding: 1em;
  }
}

.triple-toggle {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin-bottom: 1em;
  font-size: 1em;
}

.triple-slider {
  width: 90px;
  height: 28px;
  background: #eee;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  margin-right: 0.5em;
}

.triple-slider .thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 24px;
  background: #4caf50;
  border-radius: 12px;
  transition: left 0.2s cubic-bezier(.4,2,.6,1), background 0.2s;
  z-index: 1;
}

.triple-toggle[data-value="none"] .thumb { left: 2px; background: #ccc; }
.triple-toggle[data-value="optional"] .thumb { left: 32px; background: #ff851b; }
.triple-toggle[data-value="required"] .thumb { left: 62px; background: #2ecc40; }

.triple-toggle .label-text {
  transition: color 0.2s;
}
.triple-toggle[data-value="none"] .label-text {
  color: #888;
}
.triple-toggle[data-value="optional"] .label-text {
  color: inherit;
}
.triple-toggle[data-value="required"] .label-text::after {
  content: "*";
  margin-left: 0.3em;
  font-weight: bold;
}
.triple-toggle.locked .triple-slider {
  pointer-events: none;
  opacity: 0.6;
  cursor: not-allowed;
}

.double-toggle {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin-bottom: 1em;
  font-size: 1em;
}

.double-slider {
  width: 54px;
  height: 28px;
  background: #eee;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  margin-right: 0.5em;
}

.double-slider .thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 24px;
  background: #4caf50;
  border-radius: 12px;
  transition: left 0.2s cubic-bezier(.4,2,.6,1), background 0.2s;
  z-index: 1;
}

.double-toggle[data-value="off"] .thumb { left: 2px; background: #ccc; }
.double-toggle[data-value="on"] .thumb { left: 26px; background: #2ecc40; }

.double-toggle .label-text {
  transition: color 0.2s;
}

.double-toggle[data-value="off"] .label-text {
  color: #000;
  font-weight: bold;
}

.double-toggle[data-value="on"] .label-text {
  color: #2ecc40;
  font-weight: bold;
}

.double-toggle.locked .double-slider {
  pointer-events: none;
  opacity: 0.6;
  cursor: not-allowed;
}

.gbox {
	background: #f8f9fa;
	padding: 10px;
	border: 1px solid #ddd;
}

.ibox {
	background: #fff;
	padding: 50px;
	border: 1px solid #ddd;
}

.flexframe {
  display: flex;
  align-items: stretch;
}
.flexinner {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.v-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.session {
  position: relative;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s;
  user-select: none;
  touch-action: none;
  transition: background-color 0.3s ease;
}
.session:hover {
  border-bottom-color: hsl(188, 70%, 60%);
}
.session:hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
  cursor: ns-resize;
}

.grid-container {
  grid-auto-rows: var(--row-height);
}

.imodal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
}

.imodal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.session .delete-session-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s;
}

@media (max-width: 1200px) {
  .flex.one > .mobile-second {
    order: 2;
  }
  .flex.one > .mobile-first-img {
    order: 1;
	text-align: center;
  }
}

.settingbox {
	margin-top: 20px;
	background: #f8f9fa;
	padding: 10px;
	border:	1px solid #ddd;
}

.settingboxi {
	background: #f8f9fa;
	padding: 10px;
}

.openmain {
	position: sticky;
	top: 100px;
	align-self: flex-start;
	height: auto;
}

.openbookings {
	min-height: 300px;
	padding: 10px 10px 150px 10px;
	background-color: #f8f9fa;
	margin-left: -.6em;
	font-size: .8em;
	border: 1px solid #ddd;
	margin-top: 10px;
}

body.locked .playerbox,
body.locked .session {
  pointer-events: none;       
  opacity: 0.95;              
  cursor: not-allowed;      
  user-select: none;         
}
body.locked .grid-cell {
	background: #f8f9fa;
}

.tabnav {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

#newplayer {
  margin-left: auto;
}

.tablink { margin-right: 20px; }

@media (max-width: 600px) {
  .tabnav {
    flex-direction: column;
    align-items: flex-start;
  }
  #newplayer {
    margin-left: 0;
	width: 100%; 
    margin-top: 0.5em;
	text-align: center;
  }
  .tablink {
    width: 100%;
	margin-right: 0;
    margin-bottom: 0.5em; 
  }
}


h1 { color: #0074d9; font-size: 1.8em; padding: .4em 0;}
h2 { color: #0074d9; font-size: 1.6em; padding: .3em 0;}
input[type="date"], input[type="time"] { width: auto; }
.home { text-align: center; font-size: 4em; padding: 1em 0; }
.checkbox-disabled { opacity: 0.4; pointer-events: none; filter: grayscale(80%); }
.card.selected { background: #2ecc40 !important; color: #fff; }
.divider { color: #0074d9; text-align: center; margin-top: 25px; }
.prime { color: #0074d9; }
.ok { color: #2ecc40; }
.label { margin-left: 0; }
.align-right { text-align: right; }
.align-left { text-align: left; }
.align-center { text-align: center; }
.padding-lr { padding-left: 20px; padding-right: 20px; }
.padding-right { padding-right: 10px; }
.margin-left { margin-left: 10px; }
.margin-left-b { margin-left: 20px; }
.margin-top { margin-top: 20px; }
.margin-top-b { margin-top: 30px; }
.margin-top-g { margin-top: 50px; }
.margin-top-s { margin-top: 10px; }
.padding-bottom { padding-bottom: 20px; }
.padding-top { padding-top: 20px; }
.margin-z { margin: 0; }
.small { font-size: .8em; }
.large { font-size: 1.5em; }
.fs-s { font-size: 0.8em; }
.fs-n { font-size: 1em; }
.fs-l { font-size: 2em; }
.fs-xl { font-size: 4em; }
.fs-xxl { font-size: 6em; }
.err { color: #ff4136; }
.warn { color: #ff851b; }
.succ { color: #2ecc40; }
.grey { color: #ccc; }
.blue { color: #0074d9; }
.black { color: #000; }
.bgrey { background: #aaa; color: #000; font-weight: 700; }
.bprimary { background: #0074d9; }
.session-options div { display: block; margin-right: 0; margin-bottom: 0.5em; }
.mhidden, .hidden { display: none; }
.block { display: block; }
.block-a { background-color: #FAF9F6 !important; }
.block-b { background-color: rgba(17,17,17,0.05) !important; }
#bookingsuccess { border-color: #2ecc40; }
input.error, select.error { border: 2px solid #e74c3c; background: #fff6f6; }
#training-container .training-title.error, #tslots.error, #ttimes.error { color: #e74c3c; font-weight: bold; }
button.remove-training {
  background: none; color: #ff4136; border: none; font-weight: bold;
  cursor: pointer; margin-left: 10px; padding: 0; line-height: 1;
}
.calendar-wrapper {
  max-width: 100vw; overflow-x: auto; padding: 10px; box-sizing: border-box;
}
.calendar {
  display: grid;
  grid-template-columns: var(--time-column-width) repeat(7, minmax(80px, 1fr));
  min-width: 700px; border: 1px solid #ddd; background: #fff;
  position: relative; margin: 10px;
}
.day-header, .time-label {
  background: #f8f9fa; border-bottom: 1px solid #ddd; font-size: 12px;
  text-align: center; position: sticky; z-index: 2;
}
.day-header { border-right: 1px solid #ddd; padding: 8px 4px; top: 0; }
.time-label { text-align: right; padding: 0 5px; font-size: 10px; border-right: 1px solid #ddd; left: 0; z-index: 1; }
.grid-cell { border-bottom: 1px solid #eee; border-right: 1px solid #eee; min-height: var(--hour-height); }
.session {
  background: var(--session-color); color: #000; font-size: .8em; border-radius: 3px;
  padding: 2px 4px; margin: 1px; overflow: hidden; position: relative; z-index: 1;
  display: flex; line-height: 1.2; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  cursor: pointer; transition: none !important; will-change: transform; touch-action: none;
}
.session:hover { opacity: 0.9; }
.dragging { opacity: 0.5; cursor: grabbing; user-select: none; -webkit-user-select: none; }
.drop-target { box-shadow: inset 0 0 0 2px #4CAF50; }
.calendar-grid.layout-update { grid-auto-rows: minmax(40px, auto); }
.playerbox { user-select: text; -webkit-user-select: text; cursor: pointer; }
.drag-preview {
  position: fixed; pointer-events: none; z-index: 9999; opacity: 0.85;
  background: #fffbe6; border: 1px solid #ffe066; border-radius: 4px;
  padding: 0.25rem 0.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-weight: bold; min-width: 120px; transition: none;
}
.no-selection { user-select: none !important; -webkit-user-select: none !important; }
.tooltip-container { display: inline-block; position: relative; }
.tooltip-icon { cursor: pointer; }
.tooltip-content {
  display: none; position: absolute; top: 50%; left: 110%; transform: translateY(-50%);
  background: #222; color: #fff; padding: 10px 16px; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); white-space: pre-line; z-index: 9999;
  min-width: 250px; text-align: left;
}
.tooltip-container:hover .tooltip-content,
.tooltip-container:focus-within .tooltip-content { display: block; }

@media (min-width: 768px) {
  .content-box, .logo { max-width: 800px; }
  .content-box { padding: 3rem; }
}

@media (min-width: 1200px) {
  .content-box, .logo { max-width: 1000px; }
  .form-r { text-align: right; }
  .session-options div { display: inline-block; margin-right: 1em; }
  .mhidden { display: block; }
}
@media (max-width: 400px) {
  :root { --time-column-width: 35px; }
  .calendar { grid-template-columns: var(--time-column-width) repeat(7, minmax(50px, 1fr)); }
  .day-header { font-size: 9px; }
}

table.equal {
  width: 100%;
  table-layout: fixed; 
}

table.equal th,
table.equal td {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

table.players td input {
    width: 70%;
  }

@media (max-width: 768px) {
  :root { --time-column-width: 40px; --hour-height: 30px; }
  .calendar { grid-template-columns: var(--time-column-width) repeat(7, minmax(60px, 1fr)); }
  .day-header { font-size: 10px; padding: 6px 2px; }
  .session { font-size: 9px; padding: 1px 2px; }
  table.slotsession thead { display: none; }
  table.slotsession, table.slotsession tbody, table.slotsession tr, table.slotsession td {
    display: block; width: 100%;
  }
  table.slotsession tr { margin-bottom: 1em; border-bottom: 1px solid #eee; }
  table.slotsession td {
    text-align: center; position: relative; padding-left: 50%; border: none;
  }
  table.slotsession td::before {
    content: attr(data-label); position: absolute; left: 1em; width: 45%;
    white-space: nowrap; text-align: center; font-weight: bold; color: #333;
  }
  
  table.players,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }
  
  table.players {
	  width: 100%;
  }
  
  table.players thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  table.players tr {
    border: 1px solid #ccc;
    margin-bottom: 1rem;
    padding: 0.5rem;
  }
  
  table.players td {
    padding-left: 50%;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
    text-align: left;
  }
  
  table.players td::before {
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    width: 45%;
    padding-right: 0.5rem;
    white-space: pre-line;
	word-break: break-word; 
    font-weight: bold;
    content: attr(data-label);
  }
    
  table.players td .align-center {
	 text-align: left; 
  }
  table.players td select {
    width: 100%;
    box-sizing: border-box;
  }
  

	table.players tr.remarks-row td {
	  display: table-cell;
	  padding-left: 0;
	  border: none;
	}

	table.players tr.remarks-row td::before {
	  content: none !important;
	}
	
	.home { text-align: center; font-size: 2.5em; padding: 1em 0; }
}

@media print {
  body {
    font-size: 10pt;
  }
  
  .session {
	  min-height: calc(var(--hour-height) * 4);
	  overflow: visible;
	}
	
  .pagebreak {
    break-before: page;
  }
}


