@import url('variables.css');
@import url('tile.css');
@import url('logs.css');
@import url('status.css');
@import url('firmware.css');
@import url('rebooting.css');

@font-face {
  font-family: 'Inter';
  src: url('/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal italic;
  font-display: swap;
}

html {
  height: 100%;
}

body {
  color: var(--body-text);
}

svg {
  fill: none;
  stroke: currentColor;
  font-size: 1.25em;
  vertical-align: -0.1em;
}

body {
  box-sizing: border-box;
  margin: 0 4em;
  padding-bottom: 2rem;
  background-color: var(--content-background);
  font-family: Inter, Roboto, 'Helvetica Neue', sans-serif;
  overflow-x: hidden; 
}

@media only screen and (max-width: 800px) {
  body {
    margin: 0 1em;
  }

  .navigation-bar {
    margin-inline: -1em;
    padding-inline: 1em;
  }

  body .input-row > input:not([type="radio"]):not([type="checkbox"]),
  body .input-row > select {
    width: 100%;
  }
}

@media only screen and (min-width: 800px) and (max-width: 800px) {
  body {
    margin: 0 1em;
    min-width: 800px !important;
    overflow-x: scroll;
  }
}

body h1 {
  font-size: 24px;
  font-weight: 600;
}

body .text-info {
  color: var(--info-text);
  font-size: 16px;
  font-weight: 400;
}

body .text-red {
  color: var(--important-red);
}

body .input-row {
  display: flex;
  gap: 1rem;
  width: 100%;
  padding-bottom: 1em;
}

body .input-row:has(.input-group) {
  flex-wrap: wrap;
}

body .input-row .input-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 200px;
}

body .input-row .input-group label {
  font-weight: 400;
  margin-bottom: 0.5rem;
}

body .input-row .input-group .field-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: var(--status-indicator-background-amber);
  border: 1px solid var(--status-indicator-border-amber);
  color: var(--status-indicator-text-amber);
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.3;
}

body .input-row .input-group .field-warning[hidden] {
  display: none;
}

body .input-row .input-group .field-warning > span[aria-hidden] {
  font-size: 1.1rem;
  line-height: 1;
}

body .input-row.inline{
  flex-direction: row;
  align-items: center;
}

body select,
body input {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 1rem;
  border: 1px solid var(--tile-border);
  background-color: var(--input-background);
  color: var(--input-text);
}

body select:disabled,
body input:disabled {
  background-color: var(--input-background-disabled);
  color: var(--input-text-disabled);
  cursor: not-allowed;
}

body select:focus,
body input:focus {
  outline: 2px solid var(--input-text-border-hover);
}

body input:-webkit-autofill,
body input:-webkit-autofill:hover,
body input:-webkit-autofill:focus,
body textarea:-webkit-autofill,
body textarea:-webkit-autofill:hover,
body textarea:-webkit-autofill:focus,
body select:-webkit-autofill,
body select:-webkit-autofill:hover,
body select:-webkit-autofill:focus {
  background-color: var(--input-background) !important;
  box-shadow: 0 0 0px 1000px var(--input-background) inset !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--input-background) inset !important;
  color: var(--input-text) !important;
  -webkit-text-fill-color: var(--input-text) !important;
}

body input[type="number"] {
  color-scheme: var(--number-picker-scheme);
}

body a {
  all: unset;
  -webkit-user-drag: none;
  cursor: pointer;
}

body .rounded-border {
  border: 1px solid var(--tile-border);
  border-radius: 8px;
  padding: 5px;
}

body button {
  border: 1px solid var(--button-border-color);
  color: var(--button-text);
  background-color: var(--button-background-color);
  border-radius: 8px;
  align-items: center;
  padding: 10px 14px;
  display: flex;
  font-weight: 600;
  gap: 0.3em;
  font-family: Inter, Roboto, 'Helvetica Neue', sans-serif;
}

body .input-row > button {
  flex: 1;
  justify-content: center;
}

body button:disabled {
  filter: opacity(0.5);
}

body button.cancel,
body button.transparent {
  border: none;
  background: none;
}

body button.highlight {
  background-color: var(--button-highlight-background);
  color: var(--button-highlight-text);
}

body button.highlight:hover:not(:disabled) {
  background-color: var(--button-highlight-hover-background);
}

body button:hover:not(:disabled):not(.highlight) {
  background-color: var(--button-background-hover);
  color: var(--button-text-hover);
  cursor: pointer;
}

* {
  scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track-color);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb-color);
}

body hr {
  border-color: var(--tile-border);
  border-top: none;
}


/* From app.component.scss */
.navigation-bar {
  margin-inline: -4em;
  padding: 0.5em 4em;
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  background-color: var(--nav-background);
  border-bottom: 1px solid var(--header-underline-border);
}

@media only screen and (max-width: 1000px) {
  .navigation-bar {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
}

.navigation-bar nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-grow: 1;
}

@media only screen and (max-width: 1000px) {
  .navigation-bar nav {
    justify-content: space-evenly;
  }
}

.navigation-bar nav a {
  color: var(--nav-button-text);
  text-decoration: none;
  margin-inline-end: 0.5em;
  border-radius: 8px;
  padding: 8px 12px;
}

.navigation-bar nav a:hover,
.navigation-bar nav a.active {
  background-color: var(--nav-button-active-background);
  color: var(--nav-button-active-text);
}

.nav-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.nav-device-info {
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(0.65rem, 3vw, 1rem);
}

.router-div {
  flex-grow: 1;
}

hr {
  width: 100%;
  border-color: var(--tile-border);
  border-top: none;
}

fieldset{
  border-width: 1px;
  padding: 10px;
}

button{
  display: flex;
  justify-content: center;
}

.notification-banner {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  font-weight: 500;
  margin: 1em 0;
}

#notification-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  width: 88%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin: 0;
}

.notification-banner-success {
  background-color: var(--status-indicator-background-green);
  border-color: var(--status-indicator-border-green);
  color: var(--status-indicator-text-green);
}

.notification-banner-error {
  background-color: var(--status-indicator-background-red);
  border-color: var(--status-indicator-border-red);
  color: var(--status-indicator-text-red);
}