/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps
 */

/* Android's SimplyDark surfaces (Material 3 dark) with the launcher icon's oranges as the accent */
:root {
  color-scheme: dark;

  --color-background: #141218;
  --color-surface: #211f26;
  --color-on-surface: #e6e0e9;
  --color-on-surface-variant: #cac4d0;
  --color-outline: #938f99;
  --color-outline-variant: #49454f;
  --color-error: #f2b8b5;

  --color-primary: #fc8c1b;
  --color-on-primary: #000000;
  --color-primary-light: #ffad5a;
  --color-brand-gradient: linear-gradient(to top right, #e44600, #ffc933);
}

body {
  background: var(--color-background);
  color: var(--color-on-surface);
  font-family: system-ui, sans-serif;
  position: relative;
  box-sizing: border-box;
  min-height: calc(100vh - 16px); /* Fills the screen, minus the browser's default 8px body margins */
  padding-bottom: 32px; /* Keeps content clear of .copyright */
}

.copyright {
  position: absolute;
  bottom: 0;
  color: var(--color-on-surface-variant);
  font-size: 0.875rem;
}

a {
  color: var(--color-primary-light);
}

.download-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.download-links img {
  display: block;
}

/* Matches the visible part of the Play Store badge, whose image has about 10px of transparent padding */
.apk-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  min-width: 135px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #a6a6a6; /* Same gray as the badge's outline */
  border-radius: 7px;
  background: #000000;
  color: #ffffff;
  font-family: inherit;
  cursor: pointer;
}

/* Two lines like the badge: a small caption over the main word */
.apk-button-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.1;
}

.apk-button-text small {
  font-size: 0.5625rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* The real download link inside the install steps, so it's the page's primary action */
.apk-download {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: fit-content;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 24px;
  border-radius: 22px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: bold;
  text-decoration: none;
}

#why-apk {
  box-sizing: border-box;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--color-outline-variant);
  border-radius: 16px;
  background: var(--color-surface);
  color: var(--color-on-surface);
}

#why-apk[open] {
  animation: fade-in 0.4s ease-in;
}

#why-apk::backdrop {
  background: rgb(0 0 0 / 0.7);
}

/* The page behind a modal shouldn't scroll */
body:has(#why-apk[open]) {
  overflow: hidden;
}

.why-apk-body {
  padding: 0 20px 20px;
}

/* Sticks to the top corner while the steps scroll underneath */
.why-apk-close {
  position: sticky;
  top: 0;
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 0 0 auto;
  border: 0;
  border-radius: 12px;
  outline-offset: -4px; /* Keeps the focus ring inside the dialog's edge instead of clipping against it */
  background: var(--color-surface);
  color: var(--color-on-surface);
  font-size: 1.75rem;
  cursor: pointer;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.install-steps li {
  margin-block: 16px;
}

.install-steps img {
  display: block;
  width: 100%;
  max-width: 320px;
  margin-top: 8px;
  border-radius: 12px;
}

.site-header {
  padding-block: 8px;
  border-bottom: 1px solid var(--color-outline-variant);
}

.site-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-on-surface);
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
}

/* One card per scale: a single column on phones, more as the screen widens */
.scale-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scale-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--color-outline-variant);
  border-radius: 12px;
  background: var(--color-surface);
  overflow-wrap: anywhere;
}

.scale-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0; /* Lets long names wrap instead of pushing the link icon off the card */
}

.scale-list strong {
  font-size: 1.125rem;
}

.scale-list span {
  color: var(--color-on-surface-variant);
}

/* 44px is the smallest comfortable touch target */
.scale-link {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-primary-light);
}

.scale-link:hover {
  background: var(--color-outline-variant);
}

table {
  border-collapse: collapse;
  background: var(--color-surface);
}

th,
td {
  border: 1px solid var(--color-outline-variant);
}

th {
  color: var(--color-on-surface-variant);
}
