/* ─────────────────────────────────────────────────────────────────────
   core/chrome/base.css
   Shared site foundation (body, links, form controls, headings) + the core-owned
   widgets (account/contact popups) + the site chrome (header, nav, cookie
   overlay, footer, top banner).  Loaded on EVERY wrapped page by the chrome
   shell (core/chrome/shell.html) at /chrome/base.css.

   The GG-specific rules that used to be interleaved in the old
   web/static/styles.css (blushy, blog, SAO, home pages) now live in
   sites/gg/static/site.css (served at /site/site.css, loaded AFTER this file,
   so a gg rule wins any conflict with one here).

   The chrome block at the bottom is the former web/static/header.css, folded
   in so chrome + its CSS ship as one unit under core/chrome/.
   ───────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap');

a:link {
  color: RoyalBlue;
}

a:visited {
  color: MediumPurple;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  --background-color: #1a1a1a;
  background-color: var(--background-color, red);
  color: #d3d3d3;
  font-family: 'Fira Code', monospace;
  overflow-x: hidden;
}

.main-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex: 1;
  padding-top: 0px;
  margin-top: 0px;
  margin-bottom: 62px;
}

div.body-text {
  max-width: 1080px;
  padding: 3vh 10vw;
}

div.body-text p {
  text-align: justify;
  text-justify: inter-word;
}

.image-container {
  display: flex;
  gap: 1vw;
  max-width: 100vw;
  overflow-x: auto;
  margin-top: 10rem;
}

.image-container img {
  max-width: calc(((100vw / 9) - 2vw));
  height: auto;
  flex-shrink: 0;
  margin-bottom: 1rem;
}

h1, h2, h3 {
  text-align: center;
}

h1 {
  margin: 0;
}

#solveForm, #createAccountForm {
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 20px;
  max-width: 400px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

input[type="text"], input[type="email"], input[type="user_email"], input[type="password"], textarea {
  width: calc(100% - 22px);
  padding: 10px;
  border: 1px solid #333;
  border-radius: 4px;
  background-color: #2c2c2c;
  color: #e0e0e0;
  font-size: 16px;
  margin-bottom: 15px;
}

button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 4px;
  background-color: hsl(240, 100%, 59%);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  filter: brightness(85%);
}

p {
  margin: 0;
}

/* ── core-owned widgets (account popups, contact honeypot) ── */
.account_info > button {
  margin-top: 1rem;
}

.popup, .popup-overlay {
  display: none;
}

.popup.active, .popup-overlay.active {
  display: block;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(42, 42, 42, 0.9);
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  text-align: center;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

.popup input {
  display: block;
  margin-bottom: 10px;
  padding: 8px;
  width: 100%;
}

.popup button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  margin-top: 10px;
  border-radius: 4px;
}

.popup button:hover {
  background-color: #0056b3;
}

#formval {
  display: none;
}

/* ─────────────────────────────────────────────────────────────────────
   GG CHROME (header / nav / cookie overlay / footer / top banner) —
   folded in from the former web/static/header.css.
   ───────────────────────────────────────────────────────────────────── */
/* General header styles */
header {
  background-color: #333;
  color: #fff;
  z-index: 1000;
  padding: 0;
}

.top-nav {
    display: flex;
    justify-content: space-between; /* Space out menu and user options */
    align-items: center; /* Vertically align items */
    background-color: #333; /* Match the header background */
}

.menu {
    flex: 1; /* Take up remaining space if needed */
}

.menu ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex; /* Top-level items are displayed horizontally */
  align-items: center;
}

.menu ul li {
  position: relative;
  margin: 0 0px; /* Space between menu items */
}

/* Make the entire <li> clickable and responsive to hover */
.menu ul li:hover {
  background-color: #555; /* Changes background for entire <li> */
}

/* Ensure <a> fills the <li> for proper hover area */
.menu ul li a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 10px .4rem; /* Adds consistent padding for clickable area */
  text-align: left;
}

/* Dropdown menus */
.menu ul li > ul {
  display: none;
  position: absolute;
  background-color: #333;
  min-width: 160px;
  z-index: 1000;
  top: 100%; /* Position below the parent */
  left: 0;
  list-style-type: none;
  padding: 0;
}

.menu-ul-left {
  left: auto;
  right: 0; /* Align dropdown to the left */
}

/* Show dropdowns on hover */
.menu ul li:hover > ul {
  display: block;
}

/* Submenu items */
.menu ul li > ul > li {
  position: relative;
}

/* Nested dropdowns (position to the right of parent) */
.menu ul li > ul > li > ul {
  display: none;
  position: absolute;
  top: 0;
  left: 50%; /* Align nested dropdown to the right */
  /*right: 100%; /* Align nested dropdown to the right */*/
}

/* Show nested dropdowns on hover */
.menu ul li > ul > li:hover > ul {
  display: block;
}

/* Dropdown links */
.menu ul li > ul > li a {
  padding: 10px 15px; /* Consistent padding for links */
  display: block;
  text-decoration: none;
  color: #fff;
}

.menu ul li > ul > li a:hover {
  background-color: #555; /* Highlight dropdown links on hover */
}

/* For mobile, allow the dropdown to stay open when clicked */
@media (max-width: 600px) {
  .menu ul li.open > ul {
    display: block; /* Show dropdown when clicked */
  }

  /* Nested dropdown menus */
  .menu ul li > ul > li > ul {
    display: none; /* Keep nested dropdowns hidden by default */
    position: absolute;
    left: 100%; /* Position to the right of the parent */
    top: 0;
  }

  /* Show nested dropdowns when the parent li is open */
  .menu ul li > ul > li.open > ul {
    display: block; /* Show nested dropdown when clicked */
  }
}

.cookie-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .cookie-notice {
    background-color: #333;
    color: #fff;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    position: relative; /* Ensures it’s above the overlay */
    z-index: 1001;
  }

  .cookie-notice button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    margin-left: 10px;
  }

  .cookie-notice button:hover {
    background-color: #0056b3;
  }

  #main-content.blurred {
    filter: blur(5px);
    pointer-events: none;
  }

  footer {
    background-color: #1a1a1a;
    padding: 1vh;
    text-align: right;
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
    font-size: 16px;
}

@media (max-width: 600px) {
  footer {
    font-size: 10px; /* Smaller text for smaller screens */
  }
}

/* Align user-options menu to the right */
.user-options {
    z-index: 100;
    position: relative; /* Ensure dropdown alignment works properly */
    display: flex;
    justify-content: flex-end; /* Align items to the right */
}

.user-options ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.user-options ul li {
    position: relative;
}

.user-options ul li a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 10px 10px;
    background-color: #333;
    transition: background-color 0.3s ease;
}

.user-options ul li a:hover {
    background-color: #555;
}

/* Dropdown menu styles */
.user-options ul li > ul {
    display: none;
    position: absolute;
    background-color: #333;
    min-width: 160px;
    top: 100%; /* Position below the parent */
    right: 0; /* Align dropdown to the right */
    list-style-type: none;
    padding: 0;
    border-radius: 5px;
}

/* Show dropdown on hover */
.user-options ul li:hover > ul {
    display: block;
}

/* Dropdown links */
.user-options ul li > ul > li a {
    padding: 10px 15px;
    display: block;
    color: #fff;
    text-decoration: none;
}

.user-options ul li > ul > li a:hover {
    background-color: #555;
}

.gear-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.top-banner {
    position: fixed;
    margin-top: 5rem;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 15px;
    z-index: 1000;
}
.close-banner {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    border: none;
    background: none;
}
