/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

em-emoji-picker {
  --color-border-over: rgba(148, 163, 184, 0.35);
  --color-border: rgba(51, 65, 85, 0.9);
  --font-family: "Comic Relief", system-ui;
  --rgb-accent: 148, 163, 184;

  display: flex;
  justify-content: end;
  width: 100%;
  max-width: none;
  min-width: 20rem;
  max-height: min(18rem, 70vh);
  border-radius: 1rem;
  overflow: auto;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  font-size: 16px;
}

body.hotwire-native {
  min-height: 100dvh;
  background: rgb(30, 41, 59);
  color: rgb(245, 245, 245);
  padding-top: 0;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}

body.hotwire-native main {
  background: rgb(30, 41, 59);
}

#page-content {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 140ms ease-out,
    transform 140ms ease-out;
}

#page-content.page-content-leaving {
  opacity: 0.62;
  transform: translateY(0.2rem);
}

#page-content.page-content-entering {
  opacity: 0;
  transform: translateY(0.25rem);
}

@media (prefers-reduced-motion: reduce) {
  #page-content {
    transition: none;
    transform: none;
  }
}

body.hotwire-native .native-bottom-cta {
  display: none;
}

/* Pin the ingest "Submit to Clued" CTA to the bottom of the viewport on web,
   leave space at the bottom of the page so content can scroll above it. */
.ingest-submit-cta {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgb(51, 65, 85);
  backdrop-filter: blur(4px);
}

.ingest-submit-cta-inner {
  padding: 0.75rem 0 calc(env(safe-area-inset-bottom) + 1rem);
}

@media (min-width: 64rem) {
  .ingest-submit-cta {
    position: static;
    background: transparent;
    border-top: 0;
  }

  .ingest-submit-cta-inner {
    padding: 0;
    max-width: none;
  }
}

/* Add bottom padding to the ingest screen so the pinned CTA doesn't overlap
   the last bit of content on web. */
.ingest-screen {
  padding-bottom: calc(env(safe-area-inset-bottom) + 6rem);
}

@media (min-width: 64rem) {
  .ingest-screen {
    padding-bottom: 0;
  }
}

/* In the Hotwire Native shell the ingest screen has its own bottom padding
   from the tab bar — render the submit CTA inline rather than pinned. */
body.hotwire-native .ingest-submit-cta {
  position: static;
  background: transparent;
  border-top: 0;
}

body.hotwire-native .ingest-submit-cta-inner {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.hotwire-native > header {
  position: relative;
  z-index: 40;
  padding-top: max(env(safe-area-inset-top), 3rem);
  background: rgba(30, 41, 59, 0.96);
}

body.hotwire-native > header > div {
  max-width: 32rem;
  justify-content: flex-start;
  padding: 0.35rem 0.75rem 0.45rem;
}

body.hotwire-native > header nav {
  display: none;
}

body.hotwire-native .app-brand a {
  align-items: flex-start;
  padding-right: 0;
}

body.hotwire-native main {
  width: 100%;
  max-width: 32rem;
  padding: 0 0.75rem calc(env(safe-area-inset-bottom) + 5.75rem);
}

body.hotwire-native #flash-messages {
  padding-top: 0;
}

body.hotwire-native footer {
  display: none;
}

body.hotwire-native a,
body.hotwire-native button,
body.hotwire-native input,
body.hotwire-native select,
body.hotwire-native textarea {
  touch-action: manipulation;
}

body.hotwire-native a,
body.hotwire-native a:visited {
  color: inherit;
}

body.hotwire-native button,
body.hotwire-native input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.hotwire-native select,
body.hotwire-native textarea {
  min-height: 44px;
  font-size: 16px !important;
}

body.hotwire-native .leaderboard-go-button {
  min-height: auto !important;
  height: auto !important;
  line-height: 1.5 !important;
  padding-top: 0.375rem !important;
  padding-bottom: 0.375rem !important;
  font-size: 16px !important;
}

/* Exempt small inline buttons inside comments (react picker + trash + reaction chips)
   from the 44px touch-target sizing — they're meant to be compact. */
body.hotwire-native #comments_list button,
body.hotwire-native #comments_list form {
  min-height: auto;
  font-size: inherit;
}

/* Make button_to / form_with form wrappers invisible to the parent flex layout
   so the button inside sits as a direct flex item. */
body.hotwire-native #comments_list form.button_to,
body.hotwire-native #comments_list [data-controller~="emoji-picker"] {
  display: contents;
}

body.hotwire-native input[type="checkbox"],
body.hotwire-native input[type="radio"] {
  width: 1.35rem;
  height: 1.35rem;
  min-height: auto;
}

body.hotwire-native .native-screen {
  padding-top: 0.5rem;
}

body.hotwire-native .native-join-screen {
  margin-top: 0;
}

body.hotwire-native .ingest-screen {
  max-width: 27rem;
}

body.hotwire-native .ingest-screen textarea {
  min-height: 15rem;
}

body.hotwire-native .ingest-screen input,
body.hotwire-native .ingest-screen textarea {
  line-height: 1.45;
}

body.hotwire-native .submit-share-input {
  min-height: 15rem;
  font-size: 16px !important;
}

.submit-share-input {
  min-height: 14rem;
}

.submit-step-title {
  color: rgb(241, 245, 249);
  font-size: 1rem;
  font-weight: 700;
}

body.hotwire-native .submit-paste-button {
  min-height: 44px;
  font-size: 0.92rem;
}

body.hotwire-native .submit-primary-button {
  min-height: 46px;
  font-size: 1rem;
}

body.hotwire-native .ingest-screen h2 {
  letter-spacing: 0;
}

body.hotwire-native .native-page-heading {
  display: none;
}

body.hotwire-native .native-page-title {
  display: none;
}

.native-page-heading {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
}


.native-back-caret,
.native-heading-spacer {
  width: 2.5rem;
  min-height: 2.5rem;
}

.native-back-caret {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: rgb(203, 213, 225);
  font-size: 2.35rem;
  line-height: 1;
  text-decoration: none;
}

body.hotwire-native .native-back-caret {
  min-height: 2.5rem;
}

.native-profile-hero {
  padding: 1.25rem 0 0.5rem;
}

.native-clue-grid {
  width: 5.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin: 0 auto 1.35rem;
}

.native-clue-tile {
  aspect-ratio: 1;
  border-radius: 0.28rem;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.25);
}

.native-clue-tile-green {
  background: rgb(101, 211, 137);
}

.native-clue-tile-yellow {
  background: rgb(239, 204, 83);
}

.native-line-input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid rgba(71, 85, 105, 0.95);
  border-radius: 0;
  background: transparent;
  padding: 0.5rem 0;
  color: rgb(241, 245, 249);
  outline: none;
}

.native-line-input:focus {
  border-bottom-color: rgb(203, 213, 225);
}

.native-line-input::placeholder {
  color: rgb(100, 116, 139);
}

.settings-style-input {
  width: 100%;
  border: 2px solid rgb(71, 85, 105);
  border-radius: 0.375rem;
  background: rgb(15, 23, 42);
  padding: 0.5rem 0.75rem;
  color: rgb(241, 245, 249);
  font-size: 0.875rem;
  outline: none;
}

.settings-style-input:focus {
  border-color: rgb(148, 163, 184);
}

.settings-style-input::placeholder {
  color: rgb(100, 116, 139);
}

.native-primary-button {
  width: 100%;
  min-height: 48px;
  border-radius: 0.5rem;
  background: rgb(51, 65, 85);
  padding: 0.75rem 1rem;
  color: rgb(248, 250, 252);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.native-primary-button:hover {
  background: rgb(71, 85, 105);
}

.native-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 0.5rem;
  border: 2px solid rgb(51, 65, 85);
  background: transparent;
  padding: 0.5rem 1rem;
  color: rgb(226, 232, 240);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.native-secondary-button:hover {
  border-color: rgb(71, 85, 105);
  background: rgba(51, 65, 85, 0.45);
  color: rgb(248, 250, 252);
}

.native-compact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 0.375rem;
  border: 1px solid rgb(71, 85, 105);
  padding: 0.375rem 0.75rem;
  color: rgb(226, 232, 240);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.native-compact-button:hover {
  background: rgba(51, 65, 85, 0.55);
  border-color: rgb(100, 116, 139);
}

.native-inline-link {
  color: rgb(203, 213, 225);
  font-size: 0.875rem;
  font-weight: 700;
  text-underline-offset: 4px;
}

.native-inline-link:hover {
  color: rgb(248, 250, 252);
  text-decoration: underline;
}

.native-danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 0.5rem;
  border: 2px solid rgb(239, 68, 68);
  padding: 0.5rem 1rem;
  color: rgb(252, 165, 165);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.native-danger-button:hover {
  background: rgb(185, 28, 28);
  color: rgb(255, 255, 255);
}

.native-join-form,
.native-link-profile {
  border-top: 1px solid rgba(71, 85, 105, 0.8);
  padding-top: 1rem;
}

body.hotwire-native .native-legal-links {
  display: grid;
  padding-top: 0.25rem;
}

body.hotwire-native .native-legal-links a {
  min-height: 44px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
  color: rgb(148, 163, 184);
  font-size: 0.9rem;
}

body.hotwire-native .pagy.series-nav a,
body.hotwire-native .pagy.series-nav [aria-disabled="true"],
body.hotwire-native .pagy.series-nav [aria-current="page"] {
  min-width: 44px;
  min-height: 44px;
}

.leaderboard-pager .pagy.series-nav a,
.leaderboard-pager .pagy.series-nav [aria-disabled="true"],
.leaderboard-pager .pagy.series-nav [aria-current="page"] {
  width: 1.9rem;
  height: 1.9rem;
  min-width: 1.9rem;
  min-height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0.45rem;
  line-height: 1;
}

body.hotwire-native .leaderboard-pager .pagy.series-nav a,
body.hotwire-native .leaderboard-pager .pagy.series-nav [aria-disabled="true"],
body.hotwire-native .leaderboard-pager .pagy.series-nav [aria-current="page"] {
  width: 1.9rem;
  height: 1.9rem;
  min-width: 1.9rem;
  min-height: 1.9rem;
  font-size: 0.875rem;
}

.leaderboard-pager .pagy.series-nav {
  gap: 0.25rem;
}

.leaderboard-screen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaderboard-header-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

body.hotwire-native .leaderboard-screen {
  gap: 0.65rem;
  margin-top: -1.75rem;
}

body.hotwire-native .leaderboard-header-stack {
  gap: 0.85rem;
}

.leaderboard-date-label {
  margin: 0;
  line-height: 1.25;
}

.leaderboard-filter-wrap {
  margin-top: 0;
}

.leaderboard-filter-control {
  min-height: 2.25rem;
}

body.hotwire-native .leaderboard-filter-control {
  height: 2.25rem;
}

.leaderboard-go-button {
  width: 3.75rem;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.25rem;
  line-height: 1;
}

.leaderboard-filter-form {
  display: grid;
  grid-template-columns: auto minmax(8.75rem, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
}

.leaderboard-calendar-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2.25rem;
}

.leaderboard-calendar-input {
  position: absolute;
  inset: 0;
  width: 2rem;
  height: 2.25rem;
  opacity: 0.01;
  color: transparent;
}

.leaderboard-calendar-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2.25rem;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}

body.hotwire-native .leaderboard-calendar-input,
body.hotwire-native .leaderboard-calendar-label {
  min-height: 2.25rem;
}

.native-league-header {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
  max-width: 30rem;
}

.native-league-header-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.15rem 0.6rem;
  line-height: 1.15;
}

.native-league-header-caret {
  display: inline-flex;
  align-items: center;
  color: rgb(241, 245, 249);
  font-size: 0.95em;
  line-height: 1;
}

.native-league-header-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  outline: none;
  opacity: 0.01;
  appearance: none;
  -webkit-appearance: none;
}

body.hotwire-native .native-league-header-select {
  min-height: 100%;
}

.native-league-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  color: rgb(203, 213, 225);
}

.native-league-actions form {
  display: inline-flex;
}

.native-league-action {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border-radius: 0.35rem;
  padding: 0.2rem 0.35rem;
  color: rgb(203, 213, 225);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.native-league-action:hover {
  background: rgba(15, 23, 42, 0.45);
}

body.hotwire-native .native-league-actions {
  gap: 0.7rem;
  margin-top: 0;
  margin-bottom: 0;
}

body.hotwire-native .native-league-actions form {
  min-height: auto;
}

body.hotwire-native .native-league-action {
  justify-content: center;
  min-width: 2.2rem;
  min-height: 1rem;
  padding: 0;
  border-radius: 999px;
  color: rgb(203, 213, 225);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  background: transparent;
}

body.hotwire-native .native-league-action:hover {
  background: transparent;
}

.clipboard-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.4rem);
  z-index: 80;
  transform: translateX(-50%);
  width: max-content;
  max-width: 11rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  padding: 0.25rem 0.55rem;
  color: rgb(241, 245, 249);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
  pointer-events: none;
}

.clipboard-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border-left: 0.28rem solid transparent;
  border-right: 0.28rem solid transparent;
  border-top: 0.28rem solid rgba(15, 23, 42, 0.96);
}

button[data-controller~="clipboard"],
[data-controller~="clipboard"] button {
  position: relative;
}

body.hotwire-native .leaderboard-board-toggle {
  min-height: auto;
  font-size: 12px !important;
}

@media (min-width: 64rem) {
  body.hotwire-native .leaderboard-board-toggle {
    font-size: 14px !important;
  }
}

.comments-composer {
  width: 100%;
}

.comments-section {
  padding-top: 1.25rem;
}

.comments-section-title {
  color: rgb(248 250 252);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.15;
}

body.hotwire-native .comments-section {
  padding-top: 1.75rem;
}

body.hotwire-native .comments-section-title {
  font-size: 1.25rem;
}

.comments-composer-input {
  height: 2.25rem;
  min-height: 2.25rem;
}

.comments-composer-submit {
  width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
}

body.hotwire-native .comments-composer-input,
body.hotwire-native .comments-composer-submit {
  min-height: 2.25rem;
}

.comment-body,
.comments-composer-input {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

body.hotwire-native .comment-body,
body.hotwire-native .comments-composer-input {
  font-size: 16px !important;
  line-height: 1.35;
}

.comment-header {
  line-height: 1.4;
}

body.hotwire-native .comment-header {
  font-size: 0.875rem;
}

.comment-delete-button {
  width: 1.75rem;
  height: 1.75rem;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: rgb(203 213 225);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.78;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comment-delete-button.hidden {
  display: none;
}

.comment-delete-button:hover {
  background: rgb(30 41 59 / 0.75);
  opacity: 1;
}

.comment-reaction-button {
  min-height: auto;
  padding: 0.125rem 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.25;
}

body.hotwire-native .comment-delete-button,
body.hotwire-native .comment-reaction-button {
  min-height: auto;
  font-size: 16px !important;
}

.native-account-hero {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.25rem 0 0.9rem;
}

.native-account-avatar {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.8);
  font-size: 1.75rem;
}

.native-action-list {
  border-top: 1px solid rgba(71, 85, 105, 0.8);
}

.native-action-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(71, 85, 105, 0.8);
  min-height: 62px;
}

.native-action-icon {
  width: 3rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: rgb(203, 213, 225);
  font-size: 1.45rem;
  font-weight: 700;
}

.native-action-icon-primary {
  color: rgb(101, 211, 137);
}

.native-action-title,
.native-action-subtitle {
  display: block;
}

.native-action-title {
  color: rgb(241, 245, 249);
  font-weight: 700;
}

.native-action-subtitle {
  margin-top: 0.1rem;
  color: rgb(148, 163, 184);
  font-size: 0.86rem;
  line-height: 1.25rem;
}

body.hotwire-native .native-account {
  padding-top: 0.25rem;
  row-gap: 1.25rem;
}

body.hotwire-native .native-account .native-legal-links {
  margin-left: 0;
  padding-top: 0.35rem;
  border-top: 0;
}

body.hotwire-native .native-account .native-legal-links a {
  min-height: 32px;
  border-top: 0;
  padding-left: 0;
  color: rgba(148, 163, 184, 0.72);
  font-size: 0.78rem;
}
