* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body {
  flex-direction: column;
  background-color: #1b2631;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: center;
}

.container{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex: 1;
}

.container-B  {
  font-family: Arial, sans-serif;
  color: #eff;
  width: 800px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex: 1;
}

header{
    background-color: #2c3e50;
    padding: 2px;
}

main{
    padding: 10px;
    flex: 1;
    align-self: center;
    background-image: linear-gradient(rgb(71, 93, 139), rgba(1, 75, 17, 0.1)), url("/static/uz-sky.jpg");
    background-size: cover;
    background-position: center;
    --width: 100vw; /* Set the width to 100% of the viewport width */

    width: 100%;
}

footer{
    color: #ffffff;
    font-size: smaller;
    background-color: #2c504b;
    padding: 20px;
    justify-content: center;
    text-align: center;
}

footer hr {
  width: 50%; /* Adjust this value to control the width of the <hr> element */
  margin-left: auto;
  margin-right: auto;
  margin-top: 3px;
  margin-bottom: 3px;
  border: none;
  border-top: 1px solid #ffffff;
}

hr.red{
  border: 1px solid #ff6666;
  margin: 0;
}

.top-container {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1px;

}

.top-container > * {
  margin-right: 10px;
  margin-bottom: 2px;
}

.language-switch-bar {
  margin-left: auto;
  display: flex;
  gap: 5px;
}

.language-switch-bar button {
  background-color: #28516d;
  border: none;
  color: white;
  padding: 2px 4px 4px 4px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin: 2px 2px;
  cursor: pointer;
  border-radius: 4px;
}

.language-switch-bar button:hover {
  background-color: #3a6885;
  color: #ffffff;
}

.info {
  display: flex;
  align-items: center;
  font-size: 12px;
  vertical-align: middle;
  color: #4fa6e0;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.info #currentTime {
  display: inline-block;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* CSS for rotating animation */
@keyframes rotate {
  from {
      transform: rotate(360deg);
  }
  to {
      transform: rotate(0deg);
  }
}
@keyframes rotate-back {
  from {
      transform: rotate(0deg);
  }
  to {
      transform: rotate(360deg);
  }
}
.rotating-gear {
  animation: rotate 10s linear infinite;
  transform-origin: 50% 50%;
  opacity: 0.8;

}
.rotating-gear-slow {
  animation: rotate 30s linear infinite;
  transform-origin: 50% 50%;
  }
.rotating-gear-back {
  animation: rotate-back 10s linear infinite;
  transform-origin: 50% 50%;
  opacity: 0.8;
}

svg.logo {
  width: 40px;
  height: 40px;
  fill: #ffffff;
}

h1 {
  color: #ffffff;
  margin: 0;
  font-size: 1.5rem;
}

.status{
  margin:  5px 0px 0px 0px;
  padding: 0px 5px 0px 5px;
  
  color: #444444;
  background-color: #3b5772;
  border-radius: 5px;
}

.status_bar {
  width: 100%;
  margin: 0px;
  padding: 3px;
  font-size: 0.75rem;
  color: #444444;
  background-color: rgba(194, 200, 204, 0.05);
  border-radius: 5px;
  box-sizing: border-box;
}

/* Keep the top status strip on one stable line without layout jumps. */
.status_bar--single-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  overflow: hidden;
  white-space: nowrap;
}

.status_bar--single-line .status {
  margin: 0;
  min-width: 0;
  flex: 1 1 12ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status_bar--single-line #sourceStatus {
  flex: 2 1 24ch;
}

.controls{
  width: 100%;
  margin: 0px;
  padding: 2px;
  font-size: 1rem;
  color: #444444;
  background-color: rgba(194, 200, 204, 0.1);
  border-radius: 5px;
  box-sizing: border-box;
  align-items: left;
}

.protocol-controls {
  margin-top: 6px;
}

.protocol-controls span {
  margin-right: 8px;
  font-weight: 600;
}

.protocol-controls label {
  margin-right: 10px;
  white-space: nowrap;
}

.protocol-controls input[type="range"] {
  vertical-align: middle;
  width: 160px;
}

.protocol-controls .range-value {
  margin-left: 4px;
  font-weight: 600;
}

.draggable {
  position: absolute;
  background-color:  #4c6b8d;
  padding: 20px;
  cursor: move;
  border: 2px solid #233242;
  border-radius: 10px;
}
textarea {
  display: inline-block;
  margin-bottom: 10px;
}
button {
  display: inline-block;
  border-radius: 4px; /* Add rounded corners */
}

#videoWrapper {
  width: 300px;
  height: 200px;
  position: relative;
  border-radius: 5px;
}

#screenVideo {
  width: 100%;
  height: 100%;
  border: 1px solid rgb(40, 40, 94);
  background-color: rgb(211, 211, 211);
  border-radius: 5px;
}



#imageWrapper {
  position: relative;
  display: inline-block;
}

#imageWrapper:fullscreen {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#imageWrapper:fullscreen #incomingPic {
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
}

#incomingPic {
  display: block;
  width: 100%; /* Adjust as necessary */
  height: auto; /* Adjust as necessary */
}

#remoteCursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 110;
  pointer-events: none;
  color: #ffeb3b;
  font-size: 20px;
  line-height: 1;
  text-shadow: 0 0 3px #000, 0 0 1px #000;
  transform: translate(-3px, -3px);
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgb(255, 0, 0); /* Adjust as necessary */
  background: rgba(0, 200, 0, 0.2); /* Semi-transparent black */
  display: none;
  padding: 10px; /* Adjust as necessary */
  white-space: pre-wrap; /* Preserves spaces and line breaks */
  word-break: break-word; /* Prevents long words from overflowing */
  
  transition: opacity 0.2s ease; /* Adjust as necessary */
  z-index: 2;
}

button#toggle-overlay {
  position: absolute;
  top: -15px; /* Adjust as necessary */
  right: 10px; /* Adjust as necessary */
  transition: opacity 0.2s ease; /* Adjust as necessary */
  z-index:100;
  opacity: 0.2;
  background-color: #ffff00;
}










/* Session chat panel (static/chat.js) */
.chat-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background-color: #e53935;
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  text-align: center;
}

button.chat-has-unread {
  background-color: #FFD27F;
}

.chat-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 440px;
  max-width: calc(100vw - 32px);
  height: 60vh;
  min-height: 260px;
  background-color: #233242;
  color: #eef4f8;
  border: 2px solid #4c6b8d;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  resize: both;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background-color: #4c6b8d;
}

.chat-title {
  font-weight: bold;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-msg {
  margin: 0 0 8px 0;
  padding: 6px 8px;
  border-radius: 8px;
  background-color: #2f4357;
  overflow-wrap: anywhere;
}

.chat-msg-own {
  margin-left: 40px;
  background-color: #2c5a46;
}

.chat-msg-other {
  margin-right: 40px;
}

.chat-msg-pending {
  opacity: 0.6;
}

.chat-msg-failed {
  opacity: 1;
  border: 1px solid #e57373;
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 0.75rem;
  color: #9fb6c9;
}

.chat-from {
  font-weight: bold;
}

.chat-body p,
.chat-body ul,
.chat-body ol,
.chat-body blockquote,
.chat-body .chat-h {
  margin: 0 0 4px 0;
}

.chat-body ul,
.chat-body ol {
  padding-left: 20px;
}

.chat-body blockquote {
  padding-left: 8px;
  border-left: 3px solid #7f9cb5;
  color: #c9d8e4;
}

.chat-body .chat-h {
  font-weight: bold;
}

.chat-body .chat-h1 { font-size: 1.2rem; }
.chat-body .chat-h2 { font-size: 1.1rem; }

.chat-body a {
  color: #8fd3ff;
}

.chat-inline-code {
  padding: 0 3px;
  border-radius: 3px;
  background-color: #14202b;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.85rem;
}

.chat-code {
  margin: 4px 0;
  border: 1px solid #3b5772;
  border-radius: 6px;
  background-color: #14202b;
  overflow: hidden;
}

.chat-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px;
  background-color: #1d2c3a;
  font-size: 0.7rem;
  color: #9fb6c9;
}

.chat-copy-btn {
  padding: 1px 8px;
  font-size: 0.7rem;
  cursor: pointer;
}

.chat-code pre {
  margin: 0;
  padding: 6px 8px;
  overflow-x: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #e6edf3;
  white-space: pre;
}

.chat-code .tok-kw { color: #ff7b72; }
.chat-code .tok-str { color: #a5d6ff; }
.chat-code .tok-com { color: #8b949e; font-style: italic; }
.chat-code .tok-num { color: #79c0ff; }

.chat-input-row {
  display: flex;
  gap: 6px;
  padding: 6px 8px 2px 8px;
  border-top: 1px solid #3b5772;
}

.chat-input-row textarea {
  flex: 1;
  margin: 0;
  padding: 4px 6px;
  resize: vertical;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

.chat-hint {
  padding: 0 8px 6px 8px;
  font-size: 0.7rem;
  color: #9fb6c9;
}

/* Admin roles bar (static/admins.js) */
.admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 3px;
  padding: 3px 5px;
  font-size: 0.8rem;
  color: #dfe9f1;
  background-color: rgba(194, 200, 204, 0.08);
  border-radius: 5px;
}

.admin-summary {
  font-weight: bold;
  cursor: help;
}

.admin-role {
  padding: 0 6px;
  border-radius: 5px;
  color: #222;
}

.admin-role-control { background-color: #AAFFAA; }
.admin-role-view { background-color: #FFD27F; }

#requestControlBtn.admin-requested { background-color: #FFD27F; }

.admin-requests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-request {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 5px;
  background-color: #6b4f1d;
  color: #fff3d6;
  animation: admin-request-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes admin-request-pulse {
  from { box-shadow: 0 0 0 0 rgba(255, 210, 127, 0.2); }
  to { box-shadow: 0 0 6px 2px rgba(255, 210, 127, 0.8); }
}

.admin-name-label {
  margin-left: auto;
  color: #9fb6c9;
}

.admin-notice {
  flex-basis: 100%;
  color: #AAFFAA;
}

.admin-notice-warn { color: #FFD27F; }

body.pana-viewer #imageWrapper {
  outline: 2px dashed #FFD27F;
  cursor: not-allowed;
}

.chat-inline-snippet {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.chat-inline-copy {
  padding: 0 5px;
  font-size: 0.65rem;
  cursor: pointer;
}
