/*==============================================*/
/* Responsive font and layout for small screens */
@media (max-width: 800px) {
  .container {
    width: 100%;
    max-width: 100vw;
    padding: 8px 2vw;
  }
  h1 {
    font-size: 1.8em;
  }
  h2 {
    font-size: 1.2em;
  }
  h3 {
    font-size: 1em;
  }
  .status {
    font-size: 1em;
    color: aquamarine;
    width: 100%;
    max-width: 100vw;
  }
  .video-section {
    font-size: 1.2em;
    margin: 10px 0;
  }
  .video-feed {
    max-width: 100vw;
    aspect-ratio: 16 / 9;
    min-height: 350px;
    max-height: 350px;
  }
  .video-feed span {
    font-size: 1em;
  }
  .controls-section {
    align-items: stretch;
    gap: 8px;
  }
  .controls-section button {
    font-size: 0.8em;
  }
  .group-frame {
    padding: 8px 2vw;
  }
  a,
  ol,
  li,
  ul {
    padding-left: 10px;
    font-size: 0.95em;
  }
  .screen-mode-text,
  .theme-mode-text,
  .source-mode-text {
    font-size: 0.9em;
  }
  .video-source-section {
    font-size: 0.8em;
  }
  .row-tile {
    gap: 8px;
  }
  .title-section-left,
  .title-section-right {
    min-width: 180px;
    max-width: 100%;
    margin: 0;
  }
}

/*==============================================*/
/*==============================================*/
/*==============================================*/
@media (max-width: 500px) {
  .container {
    width: 100%;
    max-width: 100vw;
    padding: 2vw;
  }
  h1 {
    font-size: 1.2em;
  }
  h2 {
    font-size: 1.1em;
  }
  h3 {
    font-size: 1em;
  }
  .status {
    font-size: 0.9em;
    color: red;
    width: 100%;
    max-width: 100vw;
  }
  .video-section {
    margin: 10px 0;
  }
  .video-feed {
    aspect-ratio: 4 / 3;
    min-height: 300px;
    max-height: 300px;
  }
  .video-feed span {
    font-size: 0.8em;
  }
  .controls-section,
  .source-section,
  .mode-section,
  .status-section,
  .text-section,
  .object-section {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .controls-section button {
    font-size: 0.8em;
    /* width: 75%; */
    /* max-width: 20%; */
  }
  .group-frame-source,
  .group-frame-mode,
  .group-frame-text,
  .group-frame-grade,
  .group-frame-object,
  .group-frame-status,
  .group-frame-command,
  .group-frame-voice,
  .group-frame-detect,
  .group-frame-settings {
    padding: 4px 1vw;
    margin: 3px 0;
  }
  .footer {
    font-size: 0.8em;
  }
  a,
  ol,
  li,
  ul {
    padding-left: 5px;
    font-size: 0.9em;
  }
  .source-mode-text,
  .mode-mode-text,
  .status-mode-text,
  .screen-mode-text,
  .theme-mode-text {
    font-size: 0.8em;
    margin: 0px;
    padding: 0px;
    padding-left: 3px;
    gap: 0px;
  }
  .video-source-section {
    font-size: 0.8em;
  }
  .source-section,
  .mode-section,
  .status-section,
  .text-section,
  .object-section {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  #video-source,
  #ip-camera-url,
  #video-unit,
  #object-dropdown,
  .video-url-input,
  .button-ok,
  .button-browse {
    width: 100%;
  }
  .settings-row,
  .mode-row {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .switch {
    width: 44px;
    height: 22px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .slider {
    border-radius: 22px;
  }
  .slider:before {
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
  }
  .row-text {
    display: flex;
    flex-direction: column;
    min-width: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
  }
  .text-section button,
  .object-section button {
    font-size: 0.8em;
    width: 100%;
  }
  .mode-section select {
    width: 100%;
    max-width: 100%;
  }
  .text-section .row-text select,
  .object-section .row-text select {
    font-size: 1.2em;
    width: 100%;
    max-width: 100%;
  }
}
