body {
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
	background: url("images/background.jpg") no-repeat center center fixed;
	background-size: cover;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.schedule_day {
	display: inline-block; 
	width:600px; 
	vertical-align:top;
}

.schedule_block {
	border-radius: 7px;
	background-color: #01042D;
	height: 100%;
	min-height: 170px;
}

.schedule_block > div:hover{
	cursor: pointer;
}

.login-box {
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 10px;
	box-shadow: 0 0 15px rgba(0,0,0,0.2);
	width: 500px;
	box-sizing: border-box;
}

.text-box {
	background: rgba(255, 255, 255, 0.95);
	padding: 18px;
	border-radius: 10px;
	box-shadow: 0 0 15px rgba(0,0,0,0.2);
	width: 500px;
	box-sizing: border-box;
}

.big {
	width: auto;
}

h2 {
	text-align: center;
	margin-bottom: 20px;
}

input[type="text"],
input[type="password"] {
	display: block;
	width: 100%;
	padding: 10px;
	margin: 8px 0;
	border: 1px solid #ccc;
	border-radius: 5px;
	box-sizing: border-box;
}

.darkbutton {
	width: 100%;
	padding: 10px;
	background-color: #01042D;
	border: none;
	color: white;
	font-size: 16px;
	border-radius: 5px;
	cursor: pointer;
	box-sizing: border-box;
}

a.darkbutton{
	display: block;
	text-align: center;
}

.darkbutton:hover {
	background-color: #02187E;
}

.alertbox {
	color: #690027; 
	font-size: 15px; 
	margin-top:15px;
	font-weight: bold;
	width: 100%;
	text-align: center;
}

.textbox {
	color: #01042D; 
	font-size: 15px; 
	font-weight: bold;
	width: 100%;
	text-align: center;
}

.tbh {
	float: left;
	text-align: left;
	text-decoration: bold;
}

.menubutton {
	position: absolute; 
	left: 20px;
	top:20px;
	width: 30px;
}

.menubutton img {
	height: 100%;
	width: 100%;
}

.refreshbutton {
	right: 20px;
	bottom: 20px;
	width: 40px;
}

.refreshbutton img {
	width: 100%;
}

.empty {
	height: 15px;
}

.bblbox {
	border-radius: 15px;
	background: #30579C;
	color: #fff;
	padding: 10px;
	height: fit-content;
	min-height: 35px;
	text-align: center;
}

.triangle {
    width: 0;
    height: 0;
	margin-top:12px;
    border-top: 0px solid transparent;
    border-right: 15px solid #30579C;
    border-bottom: 18px solid transparent;
}

.triangle2 {
    width: 0;
    height: 0;
	margin-top:20px;
    border-top: 0px solid transparent;
    border-left: 15px solid #002169;
    border-bottom: 20px solid transparent;
}


.sidebar {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
	background-color: #01042D;
}

.hover-trigger:hover + .sidebar,
.sidebar:hover {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  text-align: left;
  padding: 8px;
}

tr.red {background-color: #EDB7B7}
tr.red:nth-child(even){background-color: #ED9B9B}

tr.purple {background-color: #f9f0ff}
tr.purple:nth-child(even){background-color: #ebccff}

tr:nth-child(even){background-color: #DBEAFF}

th {
  background-color: #01042D;
  color: white;
}

@media (max-width: 520px) {
	.login-box {
		padding: 20px;
		width: 95%;
	}
	
	.big {
		width: 90%;
		overflow-x: auto;
	}
	
	.text-box {
		padding: 20px;
		width: 90%;
	}

	input[type="text"],
	input[type="password"],
	button {
		font-size: 14px;
		padding: 12px;
	}
	
	body {
		background: url("images/backgroundmobile.jpg") no-repeat left top fixed;
		background-size: 100vh;
	}
	
}

/* na telefonie (<=480px) – dajemy im maksimum miejsca */
@media (max-width: 520px) {
  input[type="range"] {
    max-width: 100%;         /* usuń limit */
  }
}

.container {
  display: block;
  position: relative;
  cursor: pointer;
  font-size: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: -12;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #98C1FC;
}

.container:hover input ~ .checkmark {
  background-color: #ccc;
}

.container input:checked ~ .checkmark {
  background-color: #2655A1;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2655A1;
}

input:checked + .slider:before {
  -webkit-transform: translateX(16px);
  -ms-transform: translateX(16px);
  transform: translateX(16px);
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 500ms;
  visibility: hidden;
  display: none;
  opacity: 0;
}

.overlay.active {
	display: block;
	visibility: visible;
	opacity: 1;
}

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  width: 30%;
  position: relative;
  transition: all 5s ease-in-out;
  height: fit-content;
}

.popup h2 {
  margin-top: 0;
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
  position: absolute;
  top: 10px;
  right: 20px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.popup .close:hover {
  color: #06D85F;
}
.popup .content {
  max-height: 30%;
  overflow: auto;
}

.popup_btn {
  padding: 10px;
  text-decoration: none;
  cursor: pointer;
  height: 100%;
  width: 100%;
}


@media (max-width: 520px) {
	.checkmark {
		height: 14px;
		width: 14px;
		top: -8;
	}
	
	th, td {
		text-align: left;
		padding-right: 3px;
		padding-left: 3px;
		padding-top: 5px;
		padding-bottom: 5px;
	}
	
	.switch {
		width: 24px;
		height: 14px;
	}
	
	.slider:before {
		position: absolute;
		content: "";
		height: 10px;
		width: 10px;
		left: 2px;
		bottom: 2px;
	}
	
	input:checked + .slider:before {
		-webkit-transform: translateX(10px);
		-ms-transform: translateX(10px);
		transform: translateX(10px);
	}
	
	.box {
		width: 70%;
	}
	
	.popup {
		width: 70%;
	}
}

.gridbox {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	padding: 5px;
}

.gridbox:has(:nth-child(6)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gridbox:has(:nth-child(5)):not(:has(:nth-child(6))) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gridbox:has(:nth-child(5)):not(:has(:nth-child(6))) > :nth-child(3) { grid-column: 1; grid-row: 2; }
.gridbox:has(:nth-child(5)):not(:has(:nth-child(6))) > :nth-child(4) { grid-column: 2; grid-row: 2; }
.gridbox:has(:nth-child(5)):not(:has(:nth-child(6))) > :nth-child(5) { grid-column: 3; grid-row: 2; }

.gridbox > :nth-child(n + 7) { display: none; }

.gridbox > div {
	background-color: #C1DCFF;
	padding: 10px;
	margin: 5px;
	text-align: center;
	border-radius: 10px;
}

.obecgrid{
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	padding: 5px;
}

.obecgrid > div {
	background-color: #C1DCFF;
	padding: 10px;
	margin: 5px;
	text-align: center;
	border-radius: 10px;
}

textarea {
	flex: 1;
	width: 80%;
	height: 50px;
	padding: 12px 20px;
	box-sizing: border-box;
	border: 2px solid #ccc;
	border-radius: 4px;
	background-color: #f8f8f8;
	font-size: 16px;
	resize: none;
}

textarea.focus{
	border: none;
}

.input-container {
	display: flex;
	align-items: center;
	gap: 5px; /* spacing between button and textarea */
}

input[type="text"] {
  width: 100%;
  padding: 12px 20px;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-color: #f8f8f8;
  font-size: 16px;
}

input[type="password"] {
  width: 100%;
  padding: 12px 20px;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-color: #f8f8f8;
  font-size: 16px;
}

input[type="date"] {
  width: 100%;
  padding: 12px 20px;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-color: #f8f8f8;
  font-size: 16px;

  /* Try to neutralize native styles */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: #333;
}

select {
  width: 100%;
  padding: 12px 20px;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-color: #DBEAFF;
  font-size: 16px;
  color: #333;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  padding-right: 40px;
}

.del{
	cursor: pointer;
	text-decoration: bold;
}

.student-select{
  flex:1 1 auto;
  height:40px;
  padding:0 2.25rem 0 .75rem;       /* miejsce na strzałkę */
  border:1px solid var(--border);
  border-radius:12px;
  background:#DBEAFF;
  color:#0b0f2b;
  font:500 14px/1.2 system-ui,Segoe UI,Roboto,Arial,sans-serif;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  
  /* ukrycie natywnych strzałek i własna */
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:
    url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231a224d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat;
  background-position:right .6rem center;
  background-size:18px;
}

.student-select:hover{
  border-color:#b9c2d3;
}

.student-select:focus{
  outline:3px solid color-mix(in oklab, var(--focus) 35%, transparent);
  border-color:var(--focus);
}

.student-select:disabled{
  background:#f3f5f9;
  color:#8a93a6;
  cursor:not-allowed;
}

.dayblock{
  border-radius: 8px; /* lekko zaokrąglone rogi */
  background: linear-gradient(135deg, #b3d9ff, #66b3ff); /* jaśniejszy niebieski gradient */
  color: #1a1a1a; /* ciemny tekst */
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.del_att:hover{
	cursor: pointer;
	text-decoration: line-through;
}

.bare-textarea {
  background: none;
  border: none;             /* brak ramki */
  padding: 8px 10px;
  font: 16px/1.4 sans-serif;
  color: #222;
  resize: vertical;
  outline: none;            /* brak domyślnego obramowania */
  height: 40px;
}

/* delikatna ramka po kliknięciu */
.bare-textarea:focus {
  border: 1px solid rgba(0, 50, 120, 0.4);  /* subtelny granat */
  border-radius: 4px;
}

/* jasny granatowy placeholder */
.bare-textarea::placeholder {
  opacity: 0.95;     /* żeby przeglądarki go nie wyblakły dodatkowo */
  color: #37415C;
}