/* Shared (top.gohtml, bottom.gohtml, and shared styles) */
body {
  max-width: 650px;
  margin: 0 auto;
  padding: 0px 30px;
  line-height: 1.3;
}

header,
footer {
  p {
    text-align: center;
  }
}

/* Index.gohtml */
.container-index {
  .centered-form {
    display: block;
    margin: 0 auto;
    text-align: center;
  }

  form {
    display: inline;
  }

  .htmx-indicator {
    opacity: 0;
    visibility: hidden;
  }
  .htmx-request .htmx-indicator,
  .htmx-request.htmx-indicator {
    opacity: 1;
    visibility: visible;
    transition: opacity 200ms ease-in;
  }

  #content.htmx-indicator {
    opacity: 1;
    visibility: visible;
    transition: opacity 200ms ease-in;
  }
  #content.htmx-request #content.htmx-indicator,
  #content.htmx-request.htmx-indicator {
    opacity: 0;
    visibility: hidden;
  }

  .help-text {
    text-align: center;
  }
}

/* create_response.gohtml */

.container-create-response {
  .copy-feedback {
    display: block;
    color: #28a745;
    font-size: 14px;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  .copy-feedback.show {
    opacity: 1;
  }

  a {
    text-decoration: none;
  }
}

/* feed_html.gohtml */

.container-feed {
  .page-text {
    text-align: center;
  }

  .details-wrapper {
    display: grid;
    gap: 5px;
  }

  details > summary {
    list-style-type: none;
  }

  details > summary::before {
    display: inline-block;
    content: "▹ ";
    width: 16px;
    height: 16px;
  }

  details[open] > summary::before {
    content: "▿ ";
  }

  details > ul {
    display: grid;
    gap: 3px;
    list-style: none;
  }

  @media (max-width: 600px) {
    details > ul {
      max-width: 100%;
    }
  }

  .new-entry {
    font-weight: bold;
  }
}

/* help.gohtml */

.container-help {
  max-width: 450px;
  margin: 0 auto;

  details {
    margin: 0 auto;
    text-align: center;
  }
  details > summary {
    list-style-type: none;
  }

  details > summary::before {
    content: "▹ ";
  }

  details[open] > summary::before {
    content: "▿ ";
  }
  p {
    text-align: center;
    margin: 0 auto;
  }
  details ul {
    text-align: left;
    margin-left: 0;
  }
}
