html, body {margin:0;padding:0;border:0;max-width: 100%;max-height: 100%;cursor: auto;overflow:hidden;}
#graph {cursor:crosshair;display:inline-block;position:absolute;left:150px;top:5.5em;border:1px solid #000000;margin:0;padding:0;}
#coffee {padding: 0;}
#mObc,#mOsiad,#mT,#mObcRozl,#mObcRozlB,#mObcRozlBp,#mObcM,#mKW,#mMasa {
	text-align: left;
	font-family: Arial;
	font-size:normal;
	width:2.5em;
}
#rozl2,#rozl3,#rozl4,#rozlB2,#rozlB3,#rozlB4,#osiadX,#osiadFI,#kw2,#kw3,#kw4 {display:none}
#menu,#planszainfo{
	padding:0px;
	display:inline-block;
	width:140px;
	text-align: left;
	background: #e9e9e9;
	font-family: Arial;
	font-size:normal;
	color:black;
}
.zmien2, .zmien3, .zmien4{display:inline-block;}
.opc {padding:2px;margin:2px;display:none;border: solid 1px black;position:absolute;top:2.5em;}
h1{
	font-family: Arial;
	font-size:large;
	color:white;
	padding:2px;
	text-align: center;
	border: solid 1px #FFF;
	border-radius:0px;
	border-width:1px;
	background: #5987b5;
	margin:0;
	display:block;
	height:1.8em;
}
.infoLabel{
	font-family: Arial;
	color:black;
	padding:2px;
	font-size: normal;
	font-weight: normal;
	text-align: center;
	border: solid 1px black;
	border-radius:0px;
	border-width:1px;
	background: gray;
	margin:0;
	display:block;
	height:1.5em;
}
.touch-touch {touch-action: manipulation;}
span {margin:0px;padding:0px;}
#Info,#file {
    font-family: Arial;
	font-size: normal;
	color:black;
	font-weight: normal;
	text-align: center;
	border: solid 1px #FFF;
	border-radius:0px;
	border-width:1px;
	margin:0px;
	left:0;
	padding:0;
	list-style-type:none;
}

p{font-family: Arial;margin:0;padding:0;text-align: center;}
.o1 {
    text-align: center;
	font-size: bold;
	color:teal;
    font-weight: bold;
    margin-top:0.2em;
}
.o2 {
	text-align: left;
	font-size: smaller;
	color:black;
    font-weight: normal;
	margin-left: 0.5em;
}
.o2:before {
	content: '';
   display: inline-block;
   width: 8px;
   height: 8px;
   border-radius: 4px;
   margin-right: 0.5em;
   background-color: black;}
.o3 {
    text-align: left;
	font-size: smaller;
	color:black;
    font-weight: normal;
    margin-left: 1.5em;
}
.a-left {
	position: absolute;
	float:left;
	vertical-align:	middle;
	margin:0;
	padding:0;
	cursor:pointer;
	z-index: 2;
}
.a-right {
	float: right;
	vertical-align:	middle;
	margin:0;
	padding:0;
	cursor:pointer;
	margin-left:20px;
	width:18px;
	height:18px;
	z-index: 2;
}
.tekst {
	text-align: left;
	font-family: Arial;
	font-size:normal;
	width:2.5em;
}

#viewBig{width:16%;height:16%;
	position: absolute;
	display:none;
	left:100px;top:100px;
	float:left;
	vertical-align:	middle;z-index: 10;}
.img36{width:32px;height:32px;vertical-align:middle;}
.img24{width:24px;height:24px;vertical-align:middle;}
.img24a{height:24px;vertical-align:middle;}
.img18{width:18px;height:18px;vertical-align:middle;}
.img18h{height:20px;vertical-align:middle;}
li {list-style-type:none;}
input[type=radio]{display:none;}
button{cursor: pointer;background: none;display:none;}

.menuLabel {
	display: inline-block; 
	width: 130px;
	margin:1px 1px 1px 2px; 
	cursor: pointer;
	padding: 2px;
	border: solid 1px black;
	border-radius:2px;
}
.menuLabel img{padding-right: 5px;}
.menuLabel:hover {background-color: silver;}
.opcLabel {
	font-family: Arial;
	font-size: normal;
	display: inline-block; 
	margin: 1px; 
	cursor: pointer;
	padding: 5px;
	border: solid 1px black;
	border-radius:2px;
	height:1.2em
}
.opcLabel:hover {background-color: silver;border: solid 1px black;}
.opcDyn {position:relative;display:none;}

input[type=radio]:checked+label{
	background-color: gray;
}
.tooltip {
	position: absolute;	
	z-index: 100;
	display: block;
	font-family: Arial;
	font-size:small;
	line-height: 1.4;
	visibility: visible;
	opacity:0.85;	
  }
  .tooltip.top {padding: 5px 0;margin-top: -3px;}
  .tooltip.right {padding: 0 5px;margin-left: 3px;margin-top: 6px;}
  .tooltip.bottom {padding: 12px 0;margin-top: 3px;}
  .tooltip.left {padding: 0 5px;margin-left: -3px; }
  .tooltip-inner {
	  padding: 3px 8px;
	  color: black;
	  text-align: center;
	  background-color: rgba(253, 253, 150,1);
	  border-radius: 4px;
	  border: solid 1px black;
  }
.tooltip-arrow {position: absolute;width: 0;height: 0;border-color: transparent;border-style: solid;} 
.tooltip.top .tooltip-arrow {bottom: 0;left: 50%;margin-left: -5px;border-top-color: black;border-width: 5px 5px 0;}  
.tooltip.top-left .tooltip-arrow {bottom: 0;left: 5px;border-top-color: black;border-width: 5px 5px 0;}  
.tooltip.top-right .tooltip-arrow {right: 5px;bottom: 0;border-top-color: black;border-width: 5px 5px 0;}  
.tooltip.right .tooltip-arrow {top: 50%;left: 0;margin-top: -5px;border-right-color: black;border-width: 5px 5px 5px 0;}
.tooltip.left .tooltip-arrow {top: 50%;right: 0;margin-top: -5px;border-left-color: black;border-width: 5px 0 5px 5px;}
.tooltip.bottom .tooltip-arrow {top: 0;left: 50%;margin-left: -5px;border-bottom-color: black;border-width: 0 5px 5px;}
.tooltip.bottom-left .tooltip-arrow {top: 0;left: 5px;border-bottom-color: black;border-width: 0 5px 5px;}
.tooltip.bottom-right .tooltip-arrow {top: 0;right: 5px;border-bottom-color: black;border-width: 0 5px 5px;  }
#popup_container {
	font-family: Arial, sans-serif;
	font-size: normal;
	min-width: 300px; /* Dialog will be no smaller than this */
	max-width: 600px; /* Dialog will wrap after this width */
	background: black;
	border: solid 5px #999;
	border-radius:0px;
	border-width:1px;
	color: black;
	z-index:100;
	-moz-border-radius: 8px;
	-webkit-border-radius: 8px;}
#popup_title {
	font-size: 14px;
	font-weight: bold;
	text-align: center;
	line-height: 1.75em;
	color: white;
	background: #999;
	border: solid 1px #FFF;
/*	border-bottom: solid 1px #999;*/
	border-radius:0px;
	border-width:2px;
	cursor: default;
	padding: 0em;
	margin: 0em;}
#popup_content {
	background: 16px 16px no-repeat url("img/info.gif");
	padding: 1em 1.75em;
	margin: 0em;
	border-radius:8px;
	border-width:1px;
	z-index:10;
	background-color: white;}
#popup_content.alert {background-image: url("img/info.gif");}
#popup_content.confirm {	background-image: url("img/important.svg");}
#popup_message {	padding-left: 48px;}
#popup_panel {text-align: center;margin: 1em 0em 0em 1em;}
#popup_prompt {	margin: .5em 0em;border: solid 1px black;}
#AnimStart,#AnimStop {margin-left: 5px;}


/*@font-face {
	font-family: 'Glyphicons Halflings';
	src: url('fonts/glyphicons-halflings-regular.woff') format('woff');
}*/
@font-face {
	font-family: 'Glyphicons Halflings';
	src: url('fonts/glyphicons-halflings-regular.ttf') format('truetype');
}

.glyphicon {
	border: solid 1px #5987b5;
	position: relative;padding: 5px;
	margin-left:5px;
	display: inline-block;
	font-family: 'Glyphicons Halflings';
	font-style: normal;
	font-weight: bolder;	
	line-height: 1;
	color:black;
	cursor:pointer;
	font-size: 18px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.glyphiconB {color:blue;}
.glyphicon:hover {color:red;background: rgb(135, 152, 170);border: solid 1px darkslategray;}
.icon-full:before {content: "\e140";}
.icon-home:before {content: "\e021";}
.icon-undo:before {content: "\e069";}
.icon-save:before {content: "\e172";}
.icon-open:before {content: "\e118";}
.icon-new:before {content: "\e065";}
.icon-info:before {content: "\e086";}
.icon-refresh:before {content: "\e031";}
.icon-like:before {content: "\e125";}
.icon-uruch:before {content: "\e185";}
#like sup, #uruch sup {color:white;font-family: Arial;font-size:small;font-style:normal;}
#wynikiNum {
    background: rgba(255,255,255,0.8);
    border: 1px solid #ccc;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: 2px;
    position: absolute; /* Ważne dla draggable */
    top:5.5em;left:150px;
    z-index: 10;
    overflow: hidden; /* Żeby rogi były zaokrąglone */
    font-family: 'Arial';
	min-height: 0vh;
	max-height: 80vh;
}
/* --- 1. UCHWYT (HEADER) --- */
#wyniki-header {
    background: #AAA;
    color: #fff;
    padding: 2px 10px 2px 10px;
    margin: 0;
    cursor: move; /* Kursor sugerujący przesuwanie */
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;padding: 3px;
}
/* przycisk zamykania */
.close-btn {
    cursor: pointer;
    color: #fff;padding:0px 10px;
}
.close-btn:hover { color: #f00;background: #ccc; }

/* --- KONTENER NA TABELĘ (SCROLL) --- */
.table-scroll-wrapper {
    height: 60vh; /* Wysokość okna, po której pojawi się scroll */
    overflow-y: auto;  /* Scroll pionowy */
    display: block;
	resize: vertical; /* Pozwala na zmianę wysokości myszką */
}

/* --- STYL TABELI --- */
table {
    border-collapse: collapse;
    font-size: 13px;
}
td, th {
    border-bottom: 1px solid #ddd;
    text-align: center;
    padding: 2px 4px;
}
/* --- 2. ZABLOKOWANY NAGŁÓWEK TABELI (STICKY) --- */
th {
    position: sticky;
    top: 0;
    background-color: #f1f1f1; /* Tło musi być, żeby tekst nie przebijał */
    color: #333;
    z-index: 10; /* Musi być wyżej niż treść */
}
tr:hover {
    background-color: #f9f9f9;
}

#Polub {
	white-space: nowrap;
	cursor: pointer;
	display: inline-block;
	will-change: transform;
}
#blokPolub {
	position: absolute;
	bottom: 0.2em;
	left: 0;
	width: 100%;
	height: 2.6em;
	line-height: 2.2em;
	margin: 0 auto;
	border: 3px solid rgba(0, 0, 0, 0);
	font-size: 14px;
	font-style: normal;
	background-color: rgba(0, 0, 0, 0.4);
	color: yellow;
	overflow: hidden;
	z-index: 1;
	display: none;
}
	/* ------------ANIMACJA-PRZESUN------------ */
@keyframes przesun1 {
	from {transform: translateX(100%);}
	to {transform: translateX(-100%);}
}

@-webkit-keyframes przesun1 {
	from {-webkit-transform: translateX(100%);}
	to {-webkit-transform: translateX(-100%);}
}
#planszaDB{
	background-color: rgba(0, 0, 0,0.7);
	display:block;
	z-index: 4;
	cursor:not-allowed;
	position: absolute;	
	display: none;
}
#planszaDB h1 {position:absolute;width:90vw;left:50%;	transform: translateX(-50%);}
#planszaedycjaDB {
	position:absolute;
	overflow-y: auto;height: 90vh;width:90vw;
	left:50%;
	top:50%;
	transform: translate(-50%,-50%);
	
}
#contextMenu {
  display: none;
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
  z-index: 1000;
}
#contextMenu ul {
  list-style: none;
  margin: 0;
  padding: 5px 0;
}
#contextMenu li {
  padding: 5px 20px;
  cursor: pointer;
}
#contextMenu li:hover {
  background: #eee;
}
/* Tło blokujące ekran */
#loading-spinner {
    display: none;
    position: fixed;
    z-index: 2000; /* Wysoki index, żeby nic nie przykryło */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Nieco ciemniejsze dla lepszego kontrastu */
    
    /* Nowoczesne centrowanie zawartości */
    display: flex; /* Zmieniamy na flex, ale ukrywamy przez display: none w JS */
    justify-content: center;
    align-items: center;
}

/* Kontener trzymający spinner i wykres obok siebie */
.loading-content {
    display: flex;
    align-items: center; /* Wyrównanie w pionie do środka */
    gap: 30px; /* Odstęp między kółkiem a wykresem */
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Spinner */
.spinner-border {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Panel z wykresem i tekstem */
.graph-panel {
    display: flex;
    flex-direction: column;
}

#convergence-plot {
    background: #fff;
    border: 1px solid #ccc;
    margin-bottom: 5px;
}

#iter-info {
    font-family: monospace;
    font-size: 12px;
    color: #333;
    text-align: right;
}
.graph-title {
    font-size: 13px;       /* Mały, czytelny rozmiar */
    font-weight: 600;      /* Lekkie pogrubienie */
    text-align: center;    /* Wyśrodkowanie względem wykresu */
    color: #444;           /* Ciemnoszary, nie czarny (wygląda profesjonalniej) */
    margin-bottom: 4px;    /* Mały odstęp od wykresu */
    font-family: sans-serif;
}
/* Opcjonalnie: Jeśli iter-info jest za blisko, możesz dodać mu margin-top */
#iter-info {
    margin-top: 2px;
}