/* Tapo: the dark plug list of the Android app. */

:root {
  color-scheme: dark;
  --page: #121417;
  --surface: #1b1f26;
  --text: #e6e8eb;
  --border: #3a414c;
  --accent: #1f6f3f;
  --on-accent: #eafbf0;
  --warning: #ff6b6b;
  --plug-off: #1b1f26;
  --plug-off-text: #8b939f;
  --plug-on: #1f6f3f;
  --plug-on-text: #eafbf0;
  --plug-offline: #17191d;
  --plug-offline-text: #5a6069;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.top-bar h1 {
  margin: 0;
  padding: 0.6em 0.75em;
  font-size: 1.5em;
  font-weight: 600;
}

.plug-list {
  list-style: none;
  margin: 0;
  padding: 0 0.75em 1em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.plug {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  padding: 1.25em;
  border: none;
  border-radius: 0.75em;
  font: inherit;
  text-align: left;
  background: var(--plug-off);
  color: var(--plug-off-text);
  transition: background-color 0.15s;
}

.plug[data-state="on"] {
  background: var(--plug-on);
  color: var(--plug-on-text);
}

.plug[data-state="offline"] {
  background: var(--plug-offline);
  color: var(--plug-offline-text);
}

.plug:disabled {
  cursor: default;
}

.plug-name {
  font-size: 1.5em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.plug-state {
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.message {
  margin: 30vh 1em 0;
  text-align: center;
  font-size: 1.1em;
}
