:root {
  --ok-color: #3274ed;
  --ok-shade: #285cbd;
  --ok-hover: #e11d48;
}

html,
body,
form { margin: 0; }

body {
  font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
  padding: 20px;
  background: white;
  height: 100%;
}

form {
  display: flex;
  flex-direction: column;
  height: 95vh;
}

img {
  width: 200px;
  height: 200px;
}

textarea {
  margin-top: 20px;
  border-radius: 10px;
  border: 2px solid #ccc;
  padding: 10px;
  font-size: large;
}

.display {
  cursor: default;
}

.buttons {
  display: flex;
  align-items: center;
}

.submit {
  margin-right: 15px;
  width: 75px;
  height: 25px;
  background-color: var(--ok-color);
  color: white;
  border: none;
  border-radius: 10px;
  transition: background-color 0.3s;
}

.submit:active {
  transform: scale(0.97);
}

.trim { margin-right: 4px; }

.submit:hover {
  background-color: var(--ok-shade);
}

#update {
  margin-top: 10px;
  width: auto;
  height: auto;
  padding: 6px 10px 6px 10px;
}

#update-label
{
  display: none;
}

#user-label { margin-right: 35px; }

.collapsed
{
  visibility: hidden;
}

.icon {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

.header {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.subheader
{
  display: flex;
  justify-content: space-between;
  width: auto;
  align-items: flex-start; 
  margin: 10px;
}

.footer
{
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  width: auto;
  align-items: center;
  vertical-align: middle;
}

.main-toggle
{
  margin-top: -10px;
}

.right {
  display: flex;
  justify-content: flex-end;
  align-items: start;
}

.left {
  display: flex;
  justify-content: flex-start;
  align-items: start;
}

.htext
{
  vertical-align: middle;
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.auto {
  color: var(--ok-color);
  margin: auto;
}

.b {
  font-weight: bold;
}

.flex {
  display: flex;
}

.protocols
{
  width: 35%;
  display: grid;
  grid-template-columns: repeat(6, auto);
}

.pub
{
  width: 25%;
  display: grid;
  grid-template-columns: repeat(4, auto);
}

.pair
{
  width: 15%;
  display: grid;
  grid-template-columns: repeat(2, auto);
}

.addbookmarks
{
  width: 35%;
  min-width: 850px;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 10px 20px;
}

.addbmf
{
  width: 14%;
  min-width: 300px;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px 20px;
}

.red {
  border: 1px solid red;
}

.blue {
  border: 1px solid var(--ok-color);
}

label {
  margin-top: 10px;
}

.text {
  margin-left: 10px;
  margin-right: 10px;
}

.d {
  vertical-align: -5px;
}

.number {
  max-width: 20px;
}

input[type="url"],
input[type="text"],
input[type="password"],
input[type="number"] {
  border-radius: 8px;
  border: 2px solid #ccc;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  width: 450px;
  height: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  opacity: 1;
}

.url,
#devicename,
input[type="password"]
{
  margin-left: 10px;
  margin-top: 10px;
  width: 150px;
  padding: 10px 10px 8px 10px;
}

#bmtitle,
#bmftitle
{
  width: 150px;
}

input[type="number"]:focus {
  border-color: #0077cc;
  box-shadow: 0 0 5px rgba(0, 119, 204, 0.3);
}

.disabled
{
  background-color: #f3f4f6; /* Light gray background */
  color: #6b7280;            /* Darker gray text for readability */
  border-color: #d1d5db;     /* Distinct border */
  opacity: 1;                /* Prevents text from becoming too faint */
  -webkit-user-select: none; /* Safari, Chrome, Opera */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none; 
  user-select: none;
}

.error 
{
  outline: none;
  border : 2px solid #ce2029 !important;
} 

.h {
  display: block;
  font-weight: bold;
  margin-top: 20px;
  color: var(--ok-color);
}

br {
  display: block;
  margin-top: 10px;
}

.indent {
  margin-left: 10px;
}

.bigindent {
  margin-left: 40px;
  margin-top: 0px;
}

.top {
  margin-top: 10px;
}

.htop {
  margin-top: 8px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 24px;
  margin-left: 10px;
}

.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: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--ok-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--ok-color);
}

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

/* Rounded sliders */ .slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.tabs-container {
  max-width: 600px;
  font-family: sans-serif;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Align legends horizontally */ .tabs-nav {
  display: flex;
  flex-direction: row;
}

legend {
  transition: 0.2s;
  cursor: default;
  border-radius: 15px 15px 0px 0px;
  font-size: large;
  padding: 5px 15px 0px 15px;
  border: 2px solid var(--ok-color);
  display: block;
  margin: 0px 5px -1px 2px;
  width: 100px;
  color: white;
  background: var(--ok-color);
  text-align: center;
  user-select: none;
  transition: filter 0.3s ease;
  transition: background-color 0.3s ease;
}

legend:hover {
  color: white;
  border: 2px solid var(--ok-shade);
  background-color: var(--ok-shade);
}

legend.active {
  z-index: 1;
  background: #fff;
  color: var(--ok-color);
  border-bottom: 0px solid white;
  margin-bottom: -2px;
}

fieldset {
  border-top: none;
  display: none;
  border-radius: 0px 15px 15px 15px;
  border: 2px solid var(--ok-color);
  padding: 40px;
  padding-top: 0px;
  overflow: auto;
  min-width: 0;
  height: 82vh;
}

fieldset.active {
  display: block;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */ input[type=number] {
  -moz-appearance: textfield;
}

.devices 
{ 
  width: 12rem;
  margin-left: 2px;
}

select {
  width: 10rem;
  height: 1.8rem;
  background-color: var(--ok-color);
  border: var(--ok-color) 2px solid;
  border-radius: 10px;
  color: white;
  padding: 4px;
  font-size: 14px;
  margin: 0px 0px 0px 10px;
  padding-left: 25px;
}

select > option {
  background-color: var(--ok-color);
}

.container {
  display: inline-block;
  position: relative;
  padding: 3px 10px 0 35px;
  margin-left: 10px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  height: 16px;
  line-height: 1;
}

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

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 16px;
  width: 16px;
  background-color: white;
  border-radius: 50%;
  border: 2px solid var(--ok-color);
}

.container:hover input ~ .checkmark {
  border: 2px solid var(--ok-color);
}

.container input:checked ~ .checkmark {
  background-color: var(--ok-color);
  border: 2px solid var(--ok-color);
}

.container input:not(:checked) ~ .checkmark {
}

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

.container input:checked ~ .checkmark:after {
  display: block;
}

.container .checkmark:after {
  top: 5px;
  left: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

#displaystatus { color: var(--ok-color); }

.media-container
{
  display: flex;
  flex-direction: column; 
  gap: 10px; 
}

.media-container > select
{
  display: none;
  width: 40%;
}

#volume 
{
  width: 25%;
  height: 40px;
  vertical-align: middle;
}

.volume {
  line-height: 1; 
  display: inline-block;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ef4444;
  transition: background-color 0.3s;
  margin-right: 5px;
  visibility: hidden;
}

.status-dot.online { background-color: #22c55e; }   

a.icon-help {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  background-color: var(--ok-color);
  -webkit-mask-image: url('/images/help.svg');
  mask-image: url('/images/help.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  text-decoration: none;
  vertical-align: middle;
  margin-left: 5px;
  cursor: default;
}

a.icon-help:hover,
a.icon-help:focus-visible {
  background-color: var(--ok-hover);
}   

h2[id] { scroll-margin-top: 25vh; }

