#loading {
    position: absolute;
    top: 40%;
    left: 48%;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
table, tr, td, tbody {
    border: none;
}

/* === СТИЛІ ГАЛЕРЕЇ РЕСУРСІВ === */
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }
  .header h2 {
    margin: 0;
    color: white;
  }
  .frame {
    background: white;
    padding: 16px;
    margin: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    color: #333;
    width: 90%
    
  }
  .frame h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #333;
  }

  /* === Контейнер з прокруткою (макс. 2 рядки) === */
.items-scroll {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 6px;
  height: 145px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  box-sizing: border-box;
  align-content: flex-start; 
}

.items-scroll::-webkit-scrollbar {
  width: 6px; /* ← змінено з height на width (бо прокрутка вертикальна) */
}
  
  .items-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }
  .items-scroll::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
  }
.item {
  display: inline-block;
  font-size: 10px;
  text-align: center;
  vertical-align: top;
  cursor: pointer;
  color: #333;
  flex: 0 0 auto;
  width: 80px;
  margin: 2px;
  position: relative; 
  z-index: 1; 
  pointer-events: auto;
}

.item.selected {
  outline: 2px solid #007bff !important;
  border-radius: 6px !important;
  background-color: #e9f5ff !important; /* ← додано */
}
  .thumb-container {
    width: 80px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
  }
  .thumb {
    max-width: 50px;
    max-height: 50px;
  }
  .audio-icon {
    font-size: 24px;
    line-height: 48px;
    color: #555;
  }
  .controls-bar {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  button {
    background-color: #2a2a2a;
    color: white;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  button:hover {
    background-color: #3a3a3a;
  }
  .file-controls {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  #modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  #modal img {
    max-width: 90vw;
    max-height: 90vh;
    border: 2px solid white;
    border-radius: 4px;
  }

.remote-cursor {
	width: 1em;
	height: 1em;
	z-index: 0;
	animation: flash 0.5s linear 0.5s infinite alternate;
}

@keyframes flash {
	from { border: solid 1px #0A0}
	to { border: solid 1px #FFF}
}

.tracker_activity table {
	border-collapse: collapse;
	width: 100%;
}

#tracker_activity_0 {
	background-color: #ff9898;
}

.tracker_activity td, .tracker_activity th {
	border: none;
}

.box__file {
  display: none;
}

.box.is-uploading .box__input {
  display: none;
}
.box.is-uploading .box__uploading {
  display: block;
}

.box.has-advanced-upload {
  background-color: white;
  outline: 2px dashed black;
  padding: 2em;
}

.box.is-dragover {
  background-color: grey;
}

.box.has-advanced-upload .box__dragndrop {
  display: inline;
}

.txt_full {
	width: 100%;
}

.loginlink {
	padding: 0px 10px 0px 10px;
	border-radius: 10px;
}

.ui-tabs-active {
	color:#000 !important;
	background-color:#ffff98;
}

.save_option {
	display: inline-block !important;
	margin: 1em;
	padding: 1em;
	border-radius: 10px;
	vertical-align: top !important;
	font-size: 0.7em !important;
	text-align: left;
}

.g-recaptcha {
	display: inline-block;
}

.disabled {
	opacity: 0.5;
}

.codepreview {
	display: inline-block;
	border-radius: 10px;
	font-size:0.5em;
	margin:1em;
	padding:1em;
	background-color:#ffff98;
	transition: all 1s;
	border: solid 1px #000;
}
.codepreview h2 {
	text-align:center;
}

.codepreview:hover {
	background-color: #98ff98;
}

.selected {
	color: #090;
	font-weight: bold;
}

.user-avatar {
	float: right;
	margin: 1em;
}
html {
	font-family: monospace;
}

.brackets {
	color: #C8C8C8;
}

.randomChars {
	color: #0A0;
}

#title {
	text-align: center;
	background-color: rgba(255,255,255,0.4);
	border-radius: 10px;
}


.holder {
	position:relative;
	width:100%;
	height: 100vh;
}

#editor { 
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	font-size: 12pt;
	margin-top: 20px;
}

#footer {
	width: 100%; 
	height: 40px;
	padding: 15px;
	z-index: 100;
	align-items: center;
	background: #2a2a2a;;	
}

#topPanel {
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  background: #2a2a2a;
  z-index: 1000; /* гарантовано над усім */
  box-sizing: border-box;
}

#topPanel .toolPanel {
  display: flex;
  align-items: center;
  gap: 8px; /* відступ між кнопками */
  margin-top: 20px;
}

#topPanel .toolButton {
  height: 40px;
  width: auto;
  cursor: pointer;
  z-index:100;
}



.toolButton {
	max-width: 50px;
	max-height: 50px;
	transition: all 1s;
	border-radius:10px;
}

.hiddenButton {
	width: 0px;
	opacity: 0;
	padding: 0px;
	margin: 0px;
}

.visibleButton {
	width: 25px;
	padding: 5px;
	opacity: 1;
}

/*.toolButton:hover {
	transform: rotate(15deg);
	width: 25px;
	padding: 0px;
}*/

#recover{
width: 80%;	
}
.recover_date {
	background-color: #000;
	margin: 10px;
	padding: 10px;
	font-size: 2em;
	color: #F00;
	border-radius: 5px;
}
#recover_time{
	font-family: monospace;
	border-radius: 5px;
	margin: 10px;
	padding: 30px;
	float: right;
	border-style: solid;
	border-color: #000;
	border-width: 1px;
	background-color: #FFF;
}

#recover_time_hours {
	background-color: #000;
	margin: 10px;
	padding: 10px;
	font-size: 2em;
	color: #F00;
	border-radius: 5px;
}

#recover_time_ampm {
	background-color: #000;
	margin: 10px;
	padding: 10px;
	color: #F00;
	border-radius: 5px;
}

#recover_time_mins {
	background-color: #000;
	margin: 10px;
	padding: 10px;
	font-size: 2em;
	color: #F00;
	border-radius: 5px;
}

#dlg {
	background-color: #000;
	color: #CCC;
	width: 80%;
	/*font-size: 2em;*/
}

.tkinter table {
	border-collapse: collapse;
}

.tkinter td {
	border-width: 0px;
	text-align: center;
}

.tkinter button {
	margin-top: 1px;
	vertical-align:middle;
	background-color: #a9a9a9;	
}

.btn_lineno {
	font-size: small !important;
}

.tiny {
	font-size: 0.4em;
}

.testing_table {
	border-collapse: collapse;
}

#tests {
	position: fixed;
	z-index: 500;
	top:50px;
	right: 0px;
	padding: 10px;
	background-color: #ffff98;
	opacity: 0.5;
	border-radius: 10px 0px 0px 10px;
	border: solid #000;
	font-size: 2em;
	border-width: 2px 0px 2px 2px;
}

#tests:hover {
	opacity: 1;
}

#button {
	font-size: 12px;
}

.console_input {
	color:#0A0;
}

#canvas {
	background-color: #FFF;
	width: 400px;
	height: 92%;
}


#canvasPlot {
	background-color: #FFF;
}

.error {
	color: #F00;
	padding: 5px;
}

.buttonPanel {
	position: absolute;
	top: -70px;
	right: 0px;
	padding: 10px;
	border-radius: 10px;
	background-color: rgba(0,0,200,0.5);
	
}

.hiddenButtonPanel {
	display: none;
}

#consoleOut {
	position: relative;
	max-height: 80vh;
	overflow-y: scroll;
}

#userDetails {
	display: none;
	position: absolute;
	top: 0px;
	right: 0px;
	background-color: rgba(200,200,200,0.5);
	border-radius: 10px;
	padding: 10px;
	margin: 10px;
	font-family: 'Quicksand', sans-serif;
}

#btnToggleGlobals {
	position: absolute;
	left: 10px;
	top: 10px;
	color: #F00;
	transition: all 1s;
}
/*
#btnToggleGlobals:hover {
	font-size: 2em;
}*/

#watch {
	position: fixed;
	top: 20vh;
	max-height:60vh;
	overflow-y: auto;
	right: 0px;
	background-color: #FFF;
	color: #000;
	padding:10px;
	/*font-size: 0.5em;*/
	z-index: 2000;
	border-radius: 10px 0px 0px 10px;
	display: none;
	min-width: 2em;
	min-height:2em;
	max-width: 30%;
	transition: all 1s;
	border: solid 2px #000;
}

.breakpoints {width: .8em;}

#watch table {
	border-collapse: collapse;
	table-layout: fixed;
}

#watch table,th,td {
	border: 0px solid black;
	word-wrap:break-word;
}

#watch tr, #watch td {
	transition: all 0.5s;
	background-color: #FFF;
}

#watch th {
	background-color: #CCC;
}

#watch td:hover {
	background-color: #FF0;
}

.pass {
	color: #0a0;
}

.fail {
	color: #a00;
}

.testing_table {
	color: #000;
}
.testing_table tr, .testing_table td {
	transition: all 0.5s;
	background-color: #FFF;
	padding: 1em;
}

.testing_table th {
	background-color: #CCC;
	padding: 5px;
}

/*.testing_table tr:hover {
	font-size: 1.5em;
}*/

.testing_table td:hover {
	background-color: #FF0;
}
a.nounderline{
  color:inherit;
  text-decoration: none;
 }
 
/* 
a{
	 color: #000;
	 background-color: #FFF;
 }
*/
 pre{
	 white-space: pre-wrap;
 }
 
 #file_tabs {
	 position:absolute;
	 top: -20px;
	 max-width: 100vw;
 }
 
 .file_tab {
	 background-color: rgba(232,232,232, 0.5);
	 border-radius: 10px 10px 0px 0px;
	 padding: 5px;
	 /*height: 20px;*/
 }
 
 .file_tab:hover {
	 background-color: #FF0;
 }
 
 .file_tab_selected {
	 font-weight: bold;
	 background-color: #FF9;
 }
 .slider {
	 margin: 20px 50px 20px 50px;
 }
 
 .btn_file_settings{
	 width:30px;
	 height:20px;
	 position:relative;
	 margin: -5px 5px -5px 5px;
	 transition: all 1s;
 }
 .btn_file_settings:hover {
	transform: rotate(180deg); 
 }
 
 .debug_expand {
	 height:1em;
 }

 .CodeMirror { 	
 	position:unset;
 	height: 100%;
 }

 .CodeMirror-hints {
  position: absolute;
  z-index: 10;
  overflow: hidden;
  list-style: none;

  margin: 0;
  padding: 2px;

  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  border-radius: 3px;
  border: 1px solid silver;

  background: white;
  font-size: 90%;
  font-family: monospace;

  max-height: 20em;
  overflow-y: auto;
}

.CodeMirror-hint {
  margin: 0;
  padding: 0 4px;
  border-radius: 2px;
  white-space: pre;
  color: black;
  cursor: pointer;
}

li.CodeMirror-hint-active {
  background: #08f;
  color: white;
}

.autocomplete-builtin {
	color: green;
}

.autocomplete-var {
	color: red;
}

.ui-widget-content a {
    color: #333333;
    background-color: rgba(255,255,255,0.5);
    border-radius: 1em;
    padding: 0em 0.2em;
}

@media screen and (min-width: 500px) {
  .toolButton:first-child {
	  width: 50px;
  }
  
  .visibleButton {
    width: 50px;
  }
  
  /*.toolButton:hover {
    width:60px;
 }*/
 
 #hintBar {
	font-size: 2em;
	height: 2em;	 
 }
}

@media print {
 .ui-dialog {
 	display: none !important;
 }
 .adsbygoogle {
 	display: none !important;
 }
 .toolButton {
 	display: none !important;
 }
}
