/* ===== Retro Mono Pokémon Theme ===== */

/* Palette */
:root {
  --ink:#000;
  --paper:#fff;
  --gbc-green:#22CC22;       /* primary bright green */
  --gbc-green-dark:#007700;  /* darker for hover/focus */
  --gbc-green-light:#00AA00; /* lighter hover highlight */
}

/* Subtle scanlines */
html, body {
  background:
    repeating-linear-gradient(
      0deg,
      var(--paper), var(--paper) 2px,
      #e0e0e0 2px, #e0e0e0 4px
    );
  color: var(--ink);
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  text-rendering: optimizeSpeed;
  margin: 0;
  padding: 0 16px 80px; /* room for content + floating btn */
}

/* Headings framed */
h1, h2 {
  display: inline-block;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 10px 12px;
  margin: 16px 0 8px 0;
}
h1 { font-size: 22px; line-height: 1.2; }
h2 { font-size: 16px; line-height: 1.2; }

h3 { margin-top: 100px; }

/* Paragraphs styled like dialog boxes */
p.spacing {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 3px var(--paper) inset, 4px 4px 0 var(--ink);
  padding: 12px;
  font-size: 12px;
  margin: 100px 0;
}
p.spacing::before {
  content: "▶";
  margin-right: 8px;
}

/* Lists as menu cards */
ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  max-width: 720px;
}
ul > li {
  border-bottom: 3px dotted var(--ink);
}
ul > li:last-child { border-bottom: 0; }
ul > li > a {
  display: block;
  padding: 20px 12px;
  font-size: 14px;
  color: var(--gbc-green); /* bright green links */
  text-decoration: none;
  transition: color 0.08s ease-in-out;
}
ul > li > a:hover {
  text-decoration: underline;
  color: var(--gbc-green-light);
}
ul > li > a:active {
  color: var(--gbc-green-dark);
}

/* General link styling (applies outside ULs too) */
a {
  color: var(--gbc-green);
  text-decoration: none;
  transition: color 0.08s ease-in-out;
}
a:hover {
  color: var(--gbc-green-light);
  text-decoration: underline;
}
a:active {
  color: var(--gbc-green-dark);
}

/* Video container framed */
.video-container {
  width: min(560px, 100%);
  aspect-ratio: 16 / 9;
  position: relative;
  margin: 12px auto; /* centered */
}
.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Floating wrapper */
.pokemon-button-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
}

/* Floating Email button */
.pokemon-button {
  font-family: 'Press Start 2P', cursive; /* pixelated font */
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  text-rendering: optimizeSpeed;

  display: inline-block;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: auto;

  background: #fff;
  color: #000;
  text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;

  transition: transform 0.08s ease-in-out,
              box-shadow 0.08s ease-in-out,
              background 0.08s ease-in-out;
  z-index: 10001;
}
.pokemon-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
  background: #AAAAAA;
}
.pokemon-button:active {
  background: #CCCCCC;
}
.pokemon-button:focus {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* Mobile tweaks */
@media (max-width: 560px) {
  body { padding-left: 12px; padding-right: 12px; }
  .pokemon-button {
    bottom: 14px;
    right: 14px;
    font-size: 10px;
    padding: 9px 12px;
  }
  h1 { font-size: 18px; }
  h2 { font-size: 14px; }
}

/* ===== Retro Email-as-Chat (mono floating panel) ===== */
.retro-chat {
  max-width: 720px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  margin: 16px 0;
  image-rendering: pixelated;
  font-family: 'Press Start 2P', cursive;
}

/* Floating collapsible panel */
.rc-floating {
  width: 320px;
  margin-top: 12px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: 'Press Start 2P', cursive;
}
.rc-floating.is-collapsed { display: none; }

/* Chat body */
.rc-body {
  padding: 12px;
  height: 180px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    repeating-linear-gradient(0deg,#fff,#fff 2px,#f8f8f8 2px,#f8f8f8 4px);
}
.rc-bubble {
  max-width: 85%;
  font-size: 12px;
  padding: 8px 10px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  word-wrap: break-word;
}
.rc-bot { align-self: flex-start; }
.rc-user { align-self: flex-end; background: var(--ink); color: var(--paper); }

/* Inputs/footer */
.rc-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 3px solid var(--ink);
  background: var(--paper);
}
.rc-field {
  border: 3px solid var(--ink);
  background: var(--paper);
  padding: 8px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  box-shadow: 3px 3px 0 var(--ink);
}
.rc-msg {
  grid-column: 1 / -1;
  min-height: 44px;
  resize: vertical;
}

.rc-send {
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .05s, box-shadow .05s, background .05s;
  cursor: pointer;
}
.rc-send:hover {
  transform: translate(-2px,-2px);
  box-shadow:5px 5px 0 var(--ink);
  background:#eee;
}
.rc-send:active {
  transform: translate(0,0);
  box-shadow:2px 2px 0 var(--ink) inset;
}

.rc-note {
  font-size: 10px;
  opacity:.85;
  padding: 0 12px 12px;
  margin: 0;
}

/* Mobile tweaks for chat */
@media(max-width:560px){
  .rc-floating { width: min(92vw,360px); }
  .rc-body { height:160px; }
}


/* ==== FIX: Prevent chat inputs from overflowing ==== */

/* Make all sizing include borders/padding (stops right-edge creep) */
*, *::before, *::after { box-sizing: border-box; }

/* Cap the floating panel to the viewport width */
.rc-floating {
  width: 320px;
  max-width: calc(100vw - 24px); /* keep at least ~12px room on each side */
  overflow: hidden;              /* hide any accidental overflow */
}

/* Grid should shrink the first column instead of expanding the box */
.rc-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto; /* allow input column to shrink */
  align-items: start;
}

/* Inputs/buttons must not demand extra width */
.rc-field,
.rc-send {
  max-width: 100%;
  min-width: 0;         /* critical so long placeholders don't force overflow */
}

/* Textarea specifics */
.rc-msg {
  grid-column: 1 / -1;  /* span full width above the button row */
  width: 100%;
  min-width: 0;
}

/* Optional: slightly reduce horizontal padding for tighter fit */
.rc-field { padding: 7px; }
.rc-send  { padding: 9px 12px; }

/* Mobile: stack the send button under fields if space is tight */
@media (max-width: 560px){
  .rc-floating{
    width: min(92vw, 360px);
    right: 12px;
  }
  .rc-input{
    grid-template-columns: 1fr; /* stack */
  }
  .rc-send{
    justify-self: end;  /* button aligns to the right */
    margin-top: 6px;
  }
}

/* ==== FIX 2: Un-crush inputs + proper SEND size ==== */

/* Make the chat form a vertical stack */
.rc-input{
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-top: 3px solid var(--ink);
  background: var(--paper);
}

/* All fields full width */
.rc-field,
.rc-msg{
  width: 100%;
  min-width: 0;
  padding: 9px;                 /* comfortable, not bulky */
  font-size: 12px;
  line-height: 1.2;
  box-sizing: border-box;
}

/* SEND button sized like a real button, aligned right */
.rc-send{
  align-self: flex-end;
  padding: 10px 14px;
  font-size: 12px;
  min-width: 96px;              /* ensures it doesn’t shrink too small */
}

/* Panel sizing guard (keeps everything inside) */
.rc-floating{
  width: 340px;                 /* a bit wider to breathe */
  max-width: calc(100vw - 24px);
  overflow: hidden;
}

/* Mobile: same stack, just ensure comfortable width */
@media (max-width: 560px){
  .rc-floating{
    width: min(92vw, 360px);
    right: 12px;
  }
}

.doubleheightlink
{
  padding-top: 10px;
  padding-bottom: 10px;
}
