/* The website around the panel: the account bar, its dialogs and the admin dashboard (warm daylight). */

@font-face {
  font-family: Figtree;
  src: url("./app/fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./app/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #f6efe4;
  --bg2: #ece1d0;
  --surface: #fffaf3;
  --line: rgba(122, 84, 46, 0.18);
  --text: #2e2219;
  --muted: #7d6a58;
  --accent: #d4782f;
  --accent-dark: #a35a22;
  --danger: #c0392b;
  --shadow: 0 6px 22px rgba(92, 60, 28, 0.16);
  --font: Figtree, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --title-font: "Bricolage Grotesque", Figtree, system-ui, sans-serif;
  --bar: 44px;
  color-scheme: light;
}

.site-bar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--bar);
  box-sizing: border-box;
  padding: 0 12px 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: 14px var(--font);
}
.site-bar .plan-name {
  overflow: hidden;
  min-width: 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-bar .plan-name b {
  color: var(--text);
  font-weight: 600;
}
.grow {
  flex: 1;
}
.site-bar .who {
  overflow: hidden;
  max-width: 220px;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.has-bar bet3d-panel {
  display: block;
  height: calc(100vh - var(--bar));
  height: calc(100dvh - var(--bar));
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: 500 14px var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--accent);
}
.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.btn.primary:hover {
  background: var(--accent-dark);
}
.btn.danger {
  color: var(--danger);
}
.btn.small {
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
}
.btn:focus-visible,
.field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

dialog.site-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  box-sizing: border-box;
  padding: 22px 22px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font: 14px var(--font);
}
dialog.site-dialog.wide {
  width: min(640px, calc(100vw - 32px));
}
dialog.site-dialog::backdrop {
  background: rgba(46, 34, 25, 0.35);
}
.site-dialog h2 {
  margin: 0 0 4px;
  font: 600 20px var(--title-font);
}
.site-dialog .sub {
  margin: 0 0 16px;
  color: var(--muted);
}
.site-dialog .close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.field {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.field span {
  color: var(--muted);
  font-size: 13px;
}
.field input {
  height: 38px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: 15px var(--font);
}
.form-error {
  min-height: 18px;
  margin: 0 0 8px;
  color: var(--danger);
  font-size: 13px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.project-list {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.project-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.project-list li.current {
  border-color: var(--accent);
}
.project-list .info {
  flex: 1;
  min-width: 0;
}
.project-list a {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
td a {
  color: var(--accent-dark);
  font-weight: 600;
}
.project-list a:hover {
  color: var(--accent-dark);
}
.project-list small {
  color: var(--muted);
}
.empty {
  margin: 0 0 14px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}
details.more {
  margin-top: 14px;
  color: var(--muted);
}
details.more summary {
  cursor: pointer;
}
details.more form {
  margin-top: 10px;
}

@media (max-width: 560px) {
  .site-bar .who,
  .site-bar .plan-name span {
    display: none;
  }
  .site-bar .btn {
    padding: 0 10px;
  }
}

.btn.google {
  justify-content: center;
  width: 100%;
  height: 40px;
  gap: 10px;
  box-sizing: border-box;
}
.or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}
