/* variable declarations */
:root {
  --factle-background-black: #0f0f0f;
  --factle-green: #45db61;
  --factle-yellow: #ffec46;
  --factle-standard-gray: #c8c8c8;
  --factle-dark-gray: #303030;
  --factle-blue: #3866f6;
  --factle-fos-black: #131215;
}

#factle-body,
.factle-modal {
  font-family: "Open Sans", sans-serif;
}

/* Factle logo */
#factle-logo-text {
  font-family: Georgia, serif;
  font-weight: bold;
  font-size: 2rem;
}

/* game description text */
#description-text {
  font-style: italic;
  font-size: 0.9rem;
  opacity: 0.5;
}

/* headers for the answer column (1st, 2nd, 3rd, etc) */
#column-headers,
#game-over-column-headers {
  display: flex;
  width: 100%;
  justify-content: space-around;
  margin-bottom: 10px;
  max-width: 350px;
}

#column-headers {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  font-style: italic;
  font-size: 0.875rem;
  opacity: 0.7;
}

/* styling the question text */
#question {
  flex-grow: 0;
  flex-shrink: 1;
  font-weight: bold;
  font-size: 1.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

/* styling for cells (answer cell, option cell, submit button, backspace button, correct answer cell) */
.answer-cell,
.option-cell,
.correct-answer-cell,
.option-cell-sample,
#submit-btn,
#backspace-btn {
  width: 100%;
  aspect-ratio: 16/13; /* This ensures all cells have the same aspect ratio */
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 9px;
  /* font-weight: bold; */
  padding: 2px;
  /* styling for text wrapping */
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  text-align: center;
  overflow: hidden;
}

/* option cell, submit button and backspace button */
.option-cell,
#submit-btn,
#backspace-btn {
  border-radius: 4px;
  cursor: pointer;
}

/* styling for submit and backspace buttons */
#submit-btn,
#backspace-btn {
  font-size: 14px; /* Slightly larger font for these buttons */
  font-weight: bold;
}

/* styling for submit button */
#submit-btn {
  grid-column: 1;
  grid-row: 5;
  /* background-color: #4caf50; */
  background-color: white;
  color: black;
}

/* styling for backspace button */
#backspace-btn {
  grid-column: 5;
  grid-row: 5;
  background-color: white;
  color: black;
}

/* when option cell is selected */
.option-cell.selected {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

/*************************************************************/
.green-background {
  background-color: var(--factle-green);
}

.yellow-background {
  background-color: var(--factle-yellow);
}

.gray-background {
  background-color: var(--factle-standard-gray);
}

/* ----- end global styling ----- */
/* ----- top of page styling ----- */
/* container holding Factle logo and FOS logo */
.factle-and-fos-container {
  margin-bottom: 5px;
}

/* container holding by text and FOS logo */
.by-logo-container {
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px; /* Adds space between 'by' and the logo */
}

/* by text  before FOS logo */
.by-text {
  font-size: 0.7rem;
}

/* FOS logo */
#fos-logo {
  height: auto;
  max-height: 200px;
  width: 200px;
  max-width: 100%; /* Ensures image doesn't exceed its container width */
  vertical-align: middle;
}

/* styling for FOS logo link */
.fos-logo-link {
  display: inline-block;
  line-height: 0;
}

/* play factle/ play factle sports button */
#play-other-category-btn {
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  background-color: var(--factle-blue);
  border: 1px solid var(--factle-blue);
  transition: 0.4s ease;
}
#play-other-category-btn:hover {
  color: var(--factle-blue);
  background-color: transparent;
}

/* ----- end top of page styling ----- */
/* ----- game section styling (answers, options, etc) ----- */
/* contains the entire game */
#game-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 50px;
}

.column-header {
  text-align: center;
  width: calc(100% / GRID_SIZE);
}

/* styling for answer grid, options grid, and correct answers grid (this is the hidden row with the right answers) */
#answer-grid,
#options-grid,
#correct-answers-grid {
  /* sizing and layout */
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  width: 100%;
  margin-bottom: 0;
  /* Make sure the grids don't grow too large */
  flex-grow: 0;
  flex-shrink: 1;
}

/* default answer cell */
.answer-cell {
  background-color: white;
  border: 1px solid #ccc;
}

/* when answer cell is selected */
.answer-cell.selected {
  background-color: var(--factle-standard-gray);
}

/* default option cell */
.option-cell {
  background-color: var(--factle-standard-gray);
}

/* when the option cell is disabled */
.option-cell.disabled {
  background-color: var(--factle-standard-gray);
  color: gray;
  /* color: var(--factle-dark-gray); */
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  cursor: not-allowed;
}

.option-cell,
.answer-cell,
.correct-answer-cell {
  font-size: 0.65rem;
}

.answer-cell,
.correct-answer-cell {
  border: 2px solid var(--factle-standard-gray);
}

/* ----- stling under game (how to play, new look, etc) ----- */
.read-about-our-new-look {
  margin-top: 10px;
  /* border: 1px solid red; */
  font-size: 0.9rem;
  color: white;
}

.read-about-our-new-look a {
  color: inherit;
  text-decoration: underline;
  font-style: italic;
}

/* how to play section */
#how-to-play-section {
  margin-top: 60px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* how to play text */
.how-to-play-title {
  font-weight: bold;
  /* underline the title */
  text-decoration: underline;
}

/* how to play example cells container */
.example-result-container {
  /* sizing and layout */
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  width: 100%;
  margin-bottom: 0;
  /* Make sure the grids don't grow too large */
  flex-grow: 0;
  flex-shrink: 1;
}

/* example option cells in the how to section */
.option-cell-sample {
  cursor: default;
  border-radius: 4px;
  font-size: 1rem;
}

/* ----- end game section styling ----- */
/* ----- styling for ad containers ----- */
.skyscraper-ads-plus-game {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  height: 100%;
}

.skyscraper-ad-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
}

.skyscraper-ad {
  width: 160px;
  height: 600px;
  position: fixed;
  top: 100px;
  background-color: white;
}

.ad-container-under-how-to-play {
  width: 336px;
  height: 280px;
  margin-bottom: 50px;
  text-align: center;
  overflow: hidden;
  margin-top: 20px;
  background-color: white;
}

/* ----- end styling for ad containers ----- */
/* ----- media queries ----- */
/* in mobile, remove skyscraper-ad-container */
@media (max-width: 1100px) {
  .skyscraper-ad-container {
    display: none;
  }
}
/* ----- end media queries ----- */
/* ----- game over modal styling ----- */
.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--factle-background-black);
  color: #ffffff;
}

.modal-header {
  justify-content: center;
  color: #ffffff;
  background-color: var(--factle-background-black);
}

.modal-title {
  flex: 1;
  text-align: center;
}

/* subscribe to Facle on game over popup */
.subscribe-to-factle-text {
  width: 80%;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

#game-over-column-headers {
  margin-bottom: 0;
}

#game-over-question {
  margin-bottom: 10px;
  font-weight: bold;
}

.game-over-buttons-container {
  margin-bottom: 20px;
}
.game-over-buttons-container .btn {
  color: white;
}
.game-over-buttons-container .btn:before {
  display: none;
}

/* Add these new styles for the game over modal */
#gameOverModal .modal-content {
  border: 1px solid white !important;
  border-radius: 8px;
}

#gameOverModal .modal-header {
  border-bottom: 1px solid white !important;
}

#gameOverModal .modal-footer {
  border-top: 1px solid white !important;
}

#game-over-correct-answers {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#share-btn {
  background-color: var(--factle-green);
  border-color: var(--factle-green);
}

/* make the share button and the view data button the same width */
#share-btn,
#view-data-btn {
  width: 100px;
}

/* ----- end game over modal styling ----- */
/* area around the correct answers grid */
#hidden-row-space {
  height: 100px; /* Adjust this value based on your desired height */
  display: flex;
  justify-content: center;
  align-items: center;
}

#correct-answers-grid {
  max-width: 350px;
}

/* styling for individual cells in the hidden row */
.correct-answer-cell {
  background-color: var(--factle-blue);
  border-color: var(--factle-blue);
  color: white;
}

/* hidden row default styling */
#hidden-row {
  /* display: none; */
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

#share-with-friends-text {
  margin-top: 10px;
  margin-bottom: 10px;
}

.skyscraper-ad-styling {
  display: inline-block;
  width: 160px;
  height: 600px;
}

.box-ad-styling {
  display: inline-block;
  width: 336px;
  height: 280px;
}

.view-my-results {
  font-size: 0.7rem;
  font-weight: bold;
  margin: 12px 0 24px;
  text-align: right;
  text-decoration: underline;
  cursor: pointer;
}

.hidden {
  display: none;
}

.answer-cell[style="background-color: var(--factle-yellow);"] {
  border-color: var(--factle-yellow);
}
.answer-cell[style="background-color: var(--factle-green);"] {
  border-color: var(--factle-green);
}

#options-grid #submit-btn,
#options-grid #backspace-btn {
  color: white;
}

#options-grid #submit-btn {
  background-color: var(--factle-blue);
}

#options-grid #backspace-btn {
  background-color: var(--factle-fos-black);
}

.how-to-play-title {
  text-decoration: none;
}

#correct-answers-grid {
  max-width: 100%;
}

.modal-content {
  background-color: #fff;
  color: var(--factle-fos-black);
  position: relative;
}

.modal-dialog-top {
  margin-top: 250px;
  margin-bottom: 0;
}

.modal.show {
  padding-right: 0 !important;
}
.modal.show .modal-dialog-top {
  transform: none;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  position: fixed;
}
.modal .close {
  color: currentColor !important;
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
}

.modal-header,
.modal-body {
  background-color: unset;
  color: inherit;
}

.modal-title {
  font-weight: 600;
}

.game-over-buttons-container > .btn {
  width: auto !important;
  padding: 0.5rem 0.75rem;
  min-width: 100px;
}
.game-over-buttons-container #share-btn {
  background-color: rgb(76, 175, 80);
  border-color: rgb(76, 175, 80);
}

#factle-body {
  margin: 0 !important;
  padding-top: 2rem;
}
@media (max-width: 767px) {
  #factle-body {
    padding-top: 1rem;
  }
}

#factle-container {
  row-gap: 0.75rem;
  max-width: 420px;
}

.factle-heading-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 48px;
}
.factle-heading-container__cta .btn--no-min {
  color: #196CFC;
  font-weight: 700;
}
.factle-heading-container__cta .btn--no-min:before {
  border-width: 2px 2px 0 0;
  width: 10px;
  height: 10px;
  right: 8px;
  top: calc(50% - 2px);
}

@media (max-width: 767px) {
  #factle-heading {
    font-size: 40px;
  }
}

#factle-desc {
  font-family: "Untitled Sans", "Open Sans", "sans-serif";
}
@media (max-width: 1025px) {
  #factle-desc {
    font-size: 17px;
  }
}

#factle-byline {
  font-style: italic;
  opacity: 0.6;
  font-size: clamp(0.9375rem, 0.8822rem + 0.2457vw, 1rem);
  letter-spacing: -0.02em;
}

#factle-cta {
  background-color: var(--factle-blue);
  padding: 0.75rem 1rem;
  font-size: clamp(0.9375rem, 0.8822rem + 0.2457vw, 1rem);
  border: 1px solid var(--factle-blue);
  transition: 0.4s ease;
  color: white;
  border-radius: 0.2rem;
  text-decoration: none;
  display: inline-block;
}
#factle-cta:hover {
  background-color: transparent;
  color: var(--factle-blue);
}

.headerv2 a {
  text-decoration: none;
}

.main-menu {
  margin: 0;
}

.factle-question-date {
  font-family: "Untitled Sans", "Open Sans", "sans-serif";
}

.btn.factle-back-btn {
  color: #196CFC;
  padding-left: 20px;
  padding-right: 10px;
}
.btn.factle-back-btn:before {
  transform: translateY(-37%) rotate(-135deg);
  right: auto;
  left: 6px;
}

#factle-game-archive {
  margin-bottom: 100px;
}

.factle-archive-question {
  display: block;
  padding: 24px 20px 24px 0;
  color: inherit;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  position: relative;
  transition: 0.35s ease;
}
.factle-archive-question:hover {
  color: #3866F6;
}
.factle-archive-question:before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath d='M471.1 297.4C483.6 309.9 483.6 330.2 471.1 342.7L279.1 534.7C266.6 547.2 246.3 547.2 233.8 534.7C221.3 522.2 221.3 501.9 233.8 489.4L403.2 320L233.9 150.6C221.4 138.1 221.4 117.8 233.9 105.3C246.4 92.8 266.7 92.8 279.2 105.3L471.2 297.3z'/%3E%3C/svg%3E");
}
.factle-archive-question__question {
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-size: 10px;
  margin-bottom: 8px;
  line-height: 1.4;
}
.factle-archive-question__date {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.5;
}

#factle-archive-pagination {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
#factle-archive-pagination .page-numbers {
  display: inline-flex;
  align-items: ce;
  padding: 5px;
  color: inherit;
  text-decoration: none;
  transition: 0.35s ease;
  font-weight: 500;
  letter-spacing: -0.03em;
}
#factle-archive-pagination .page-numbers.current {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--factle-blue);
}
#factle-archive-pagination .page-numbers svg {
  transform: translateY(1px);
}
#factle-archive-pagination .page-numbers svg path {
  fill: currentColor;
}
#factle-archive-pagination a.page-numbers:hover {
  color: var(--factle-blue);
}

.factle-faqs .factle-faq-item {
  border-bottom: 1px solid #e5e5e5;
}
.factle-faqs .factle-faq-item .factle-faq-question[aria-expanded=true] {
  border-bottom: 1px solid #3866F6;
}
.factle-faqs .factle-faq-item .factle-faq-question {
  position: relative;
  display: block;
  text-align: left;
  width: 100%;
  padding: 1em 0;
  color: var(--factle-dark-gray);
  font-size: 1.15rem;
  font-weight: 400;
  border: none;
  background: none;
  outline: none;
}
.factle-faqs .factle-faq-item .factle-faq-question:hover, .factle-faqs .factle-faq-item .factle-faq-question:focus {
  cursor: pointer;
  color: #3866F6;
}
.factle-faqs .factle-faq-item .factle-faq-question:hover::after, .factle-faqs .factle-faq-item .factle-faq-question:focus::after {
  cursor: pointer;
  color: #3866F6;
  border: 1px solid #3866F6;
}
.factle-faqs .factle-faq-item .factle-faq-question__text {
  padding: 1rem 1.5rem 1rem 0;
}
.factle-faqs .factle-faq-item .factle-faq-question .icon {
  display: inline-block;
  position: absolute;
  top: 18px;
  right: 0;
  width: 22px;
  height: 22px;
  border: 1px solid;
  border-radius: 22px;
}
.factle-faqs .factle-faq-item .factle-faq-question .icon:before {
  display: block;
  position: absolute;
  content: "";
  top: 9px;
  left: 5px;
  width: 10px;
  height: 2px;
  background: currentColor;
}
.factle-faqs .factle-faq-item .factle-faq-question .icon:after {
  display: block;
  position: absolute;
  content: "";
  top: 5px;
  left: 9px;
  width: 2px;
  height: 10px;
  background: currentColor;
}
.factle-faqs .factle-faq-item .factle-faq-question[aria-expanded=true] {
  color: #3866F6;
}
.factle-faqs .factle-faq-item .factle-faq-question[aria-expanded=true] .icon::after {
  width: 0;
}
.factle-faqs .factle-faq-item .factle-faq-question[aria-expanded=true] + .factle-faq-answer {
  opacity: 1;
  max-height: 400px;
}
.factle-faqs .factle-faq-item .factle-faq-answer {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: 0.35s ease;
}
.factle-faqs .factle-faq-item .factle-faq-answer p {
  margin: 1rem 0;
}

#factle-faq-heading {
  margin-bottom: 24px;
}

#factle-middle {
  padding-bottom: 48px;
}

.factle-back-btn-container {
  margin-bottom: 16px;
}

.btn.focus, 
.btn:focus {
  outline: none;
  box-shadow: unset;
}