:root {
  --pri-bg-color: #fffdf9;
  --sec-bg-color: #fbf6ef;
  --code-bg-color: #fffaf4;
  --border-color: #ead8ca;
  --fg-color: #2c211d;
  --nav-fg-color: #fffaf4;
  --accent-color: #d85b34;
  --retzo-primary: #d85b34;
  --retzo-primary-dark: #8f3a25;
  --retzo-green: #355f42;
  --retzo-ink: #2c211d;
  --retzo-paper: #fffdf9;
  --retzo-soft: #fbf6ef;
}

html,
body,
select,
button,
textarea {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif !important;
}

body {
  background:
    radial-gradient(circle at 86% 10%, rgba(216, 91, 52, 0.1) 0 17rem, transparent 17.2rem),
    radial-gradient(circle at 8% 72%, rgba(53, 95, 66, 0.07) 0 15rem, transparent 15.2rem),
    linear-gradient(145deg, #ffffff 0%, var(--retzo-soft) 100%);
}

nav {
  background: linear-gradient(110deg, var(--retzo-ink), #443027 68%, var(--retzo-primary-dark));
  box-shadow: 0 10px 34px rgba(44, 33, 29, 0.16);
}

#nav,
.locale-panel,
.page-footer {
  background-color: transparent;
}

#logo-container {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

#logo-container .logo {
  content: url("/retzo-logo.png");
  width: 44px;
  height: 44px;
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
}

#logo-container span {
  display: inline-block;
  font-size: 0;
}

#logo-container span::after {
  content: "Retzo · Traduction";
  color: #fffaf4;
  font-size: 1.2rem;
}

#nav a,
#nav-mobile a {
  text-decoration: none;
}

#nav a:hover {
  background: rgba(255, 255, 255, 0.09);
}

#nav-mobile {
  background: var(--retzo-ink);
}

.locale-panel {
  background: #443027 !important;
  border-radius: 0 0 0.9rem 0.9rem !important;
}

main#app {
  padding-top: 1.25rem;
}

h3.header {
  margin: 1.2rem 0 2rem;
  color: var(--retzo-ink);
  font-size: 0;
  font-weight: 750;
  line-height: normal;
  letter-spacing: -0.035em;
}

.retzo-heading-title {
  display: block;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
}

.retzo-heading-subtitle {
  display: block;
  margin-top: 0.65rem;
  color: #765f53;
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.5;
  letter-spacing: 0;
}

.retzo-heading-subtitle a {
  color: var(--retzo-primary-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.retzo-heading-subtitle a:hover {
  color: var(--retzo-primary);
}

#translation-type-btns {
  margin-bottom: 1.2rem;
}

.btn,
.btn-switch-type,
.file-dropzone .btn {
  border-radius: 999px;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
}

.btn-switch-type {
  background: rgba(255, 253, 249, 0.78);
  border: 1px solid var(--border-color);
}

.btn-switch-type:hover {
  background: #fff;
}

.btn-switch-type.active,
.btn-switch-type.active:focus,
.file-dropzone .btn {
  background: var(--retzo-primary);
  box-shadow: 0 10px 24px rgba(216, 91, 52, 0.22);
}

.language-select {
  min-height: 3.2rem;
  color: #765f53;
}

.language-select select {
  color: var(--retzo-ink);
  text-decoration: none;
  font-weight: 750;
}

.btn-switch-language {
  color: var(--retzo-primary);
}

.btn-switch-language .material-icons {
  color: inherit;
}

.textarea-container textarea,
.file-dropzone,
.code,
.card {
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 20px 50px rgba(53, 33, 18, 0.08);
}

.textarea-container textarea {
  min-height: 230px;
  padding: 1.35rem 2.6rem 1.35rem 1.35rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.textarea-container textarea:focus {
  border-color: var(--retzo-primary) !important;
  box-shadow: 0 22px 55px rgba(216, 91, 52, 0.12) !important;
  outline: none;
}

.progress .indeterminate {
  background-color: var(--retzo-primary);
}

.btn-action,
.btn-action .material-icons,
.btn-delete-text,
.btn-delete-text .material-icons {
  color: #765f53;
}

.btn-action:hover,
.btn-delete-text:hover {
  color: var(--retzo-primary);
}

.code {
  min-height: 230px;
}

.retzo-api-details {
  margin-top: 1.5rem;
  padding: 0 !important;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  background: rgba(255, 253, 249, 0.72);
  box-shadow: 0 16px 40px rgba(53, 33, 18, 0.06);
  overflow: hidden;
}

.retzo-api-details summary {
  position: relative;
  padding: 1rem 3.25rem 1rem 1.25rem;
  color: var(--retzo-ink);
  cursor: pointer;
  font-weight: 750;
  list-style: none;
  user-select: none;
}

.retzo-api-details summary::-webkit-details-marker {
  display: none;
}

.retzo-api-details summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 1.25rem;
  color: var(--retzo-primary);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-50%);
}

.retzo-api-details[open] summary::after {
  content: "−";
}

.retzo-api-details[open] summary {
  border-bottom: 1px solid var(--border-color);
}

.retzo-api-details .code-row-wrapper {
  margin: 0;
  padding: 1rem 0.75rem 0;
}

.page-footer {
  margin-top: 4rem;
  background:
    radial-gradient(circle at 78% 30%, rgba(216, 91, 52, 0.22), transparent 18rem),
    var(--retzo-ink);
}

.page-footer a {
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

.footer-copyright {
  background: rgba(0, 0, 0, 0.12) !important;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pri-bg-color: #241d19;
    --sec-bg-color: #2c231e;
    --code-bg-color: #2c231e;
    --border-color: #513a30;
    --fg-color: #fff3eb;
    --accent-color: #f0784f;
    --retzo-primary: #f0784f;
    --retzo-primary-dark: #d85b34;
    --retzo-ink: #1c1714;
    --retzo-paper: #241d19;
    --retzo-soft: #1c1714;
  }

  body {
    background:
      radial-gradient(circle at 86% 10%, rgba(240, 120, 79, 0.14) 0 17rem, transparent 17.2rem),
      radial-gradient(circle at 8% 72%, rgba(159, 194, 127, 0.08) 0 15rem, transparent 15.2rem),
      linear-gradient(145deg, #241d19 0%, #1c1714 100%);
  }

  h3.header {
    color: #fff3eb;
  }

  .retzo-heading-subtitle,
  .language-select {
    color: #d7bbaa;
  }

  .retzo-heading-subtitle a {
    color: var(--retzo-primary);
  }

  .language-select select {
    color: #fff3eb;
  }

  .btn-switch-type {
    background: rgba(44, 35, 30, 0.88);
  }

  .btn-switch-type:hover {
    background: #372a24;
  }

  .textarea-container textarea,
  .file-dropzone,
  .code,
  .card,
  .retzo-api-details {
    background: rgba(44, 35, 30, 0.94);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.24);
  }

  .retzo-api-details summary {
    color: #fff3eb;
  }

  .btn-action,
  .btn-action .material-icons,
  .btn-delete-text,
  .btn-delete-text .material-icons {
    color: #d7bbaa;
  }
}

@media (min-width: 601px) {
  .btn-text {
    display: inline;
  }
}

@media (max-width: 600px) {
  #logo-container span::after {
    font-size: 1rem;
  }

  main#app {
    padding-top: 0.5rem;
  }

  h3.header {
    margin-bottom: 1.2rem;
  }

  .textarea-container textarea {
    min-height: 180px;
  }
}
