/* "Join the Culture" popup — colors matched to the Good Bugs brand board.
   Scoped to its own variables here; styles.css is untouched. */

.colony-overlay,
.colony-modal {
  --gb-forest: #1F4D2E;
  --gb-cream: #FBF4DF;
  --gb-mango: #F4A21C;
  --gb-mango-soft: #F8CE8A;
  --gb-mango-deep: #C97F0A;
  --gb-cacao: #4B2A20;
  --gb-strawberry: #F5BCC8;
  --gb-strawberry-deep: #C9607A;
  --gb-text: #3B2A1E;
  --gb-text-soft: #5B4A3A;
  --gb-sand: #EFE6CE;
}

.colony-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(30, 58, 39, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.colony-overlay[hidden] { display: none; }

.colony-modal {
  position: relative;
  width: 460px;
  max-width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--gb-cream);
  border-radius: 28px;
  padding: 48px 40px 36px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  font-family: var(--body);
  color: var(--gb-forest);
}

.colony-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--gb-forest);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.colony-close:hover { background: var(--gb-sand); }

.colony-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.colony-dots[hidden] { display: none; }
.colony-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gb-sand); }
.colony-dots .dot.is-active { background: var(--gb-mango); }

.colony-screen { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.colony-screen[hidden] { display: none; }
.colony-screen h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  color: var(--gb-forest);
  outline: none;
}
.colony-screen p { color: var(--gb-text); font-size: 16px; max-width: 340px; }

.colony-art { width: 100%; max-width: 260px; height: auto; margin: 0 auto; }
.colony-art-fridge { max-width: 100%; border-radius: 20px; }
.colony-bugmain { max-width: 180px; }
.colony-bugmain.is-bouncing { animation: colony-bounce 0.6s ease; }
@keyframes colony-bounce {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-18px) scale(1.05); }
  60% { transform: translateY(0) scale(0.98); }
  80% { transform: translateY(-6px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

.colony-screen form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.colony-screen label { font-size: 14px; font-weight: 700; color: var(--gb-forest); }
.colony-screen input {
  width: 100%; height: 52px; padding: 0 18px; border-radius: 999px;
  border: 2px solid var(--gb-sand); font: 16px var(--body); color: var(--gb-forest);
  background: #fff;
}
.colony-screen input:focus-visible { outline: 3px solid var(--gb-mango); outline-offset: 2px; }
.colony-error { color: #B23E07; font-weight: 700; font-size: 14px; min-height: 1.2em; text-align: left; }

.colony-options { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.colony-option {
  min-height: 56px; padding: 14px 20px; border-radius: 16px; border: 2px solid var(--gb-sand);
  background: #fff; font: 700 17px var(--body); color: var(--gb-forest); cursor: pointer;
  text-align: left; transition: border-color .15s ease, background .15s ease;
}
.colony-option:hover, .colony-option:focus-visible { border-color: var(--gb-mango); background: var(--gb-sand); outline: none; }

/* override the shared site .btn classes to the brand-board colors, scoped to the popup only */
.colony-modal .btn-solid { background: var(--gb-forest); color: var(--gb-cream); }
.colony-modal .btn-solid:hover { background: #163b22; color: var(--gb-cream); }
.colony-modal .btn-outline { border-color: var(--gb-forest); color: var(--gb-forest); }
.colony-modal .btn:focus-visible { outline-color: var(--gb-mango); }

.colony-skip { font-size: 13px; color: var(--gb-text); text-decoration: underline; margin-top: 4px; }
.colony-fineprint { font-size: 12px; color: var(--gb-text); max-width: 340px; text-align: center; margin: 0 auto; }

/* Colony ID card */
.colony-id-card {
  width: 100%; background: var(--gb-cream); border: 3px solid var(--gb-forest); border-radius: 20px;
  overflow: hidden; text-align: left; position: relative;
}
.colony-card-top { height: 28px; background: var(--gb-mango); }
.colony-card-body { display: flex; gap: 16px; padding: 16px 84px 16px 16px; }
.colony-card-photo {
  width: 96px; height: 96px; flex-shrink: 0; border-radius: 12px; border: 2px solid var(--gb-forest);
  background: var(--gb-mango-soft); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.colony-card-photo img { width: 100%; height: 100%; object-fit: contain; }
.colony-card-fields { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.colony-card-strain { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 17px; color: var(--gb-forest); }
.colony-card-species { font-size: 13px; color: var(--gb-text); margin-bottom: 4px; }
.colony-card-line { font-size: 13px; color: var(--gb-forest); }
.colony-card-line span { font-weight: 700; margin-right: 4px; }
.colony-card-discovery { font-size: 12px; font-style: italic; color: var(--gb-text); margin-top: 4px; }
.colony-card-stamp {
  position: absolute; right: 14px; bottom: 14px; width: 58px; height: 58px; border-radius: 50%;
  border: 2px dashed var(--gb-mango-deep); display: flex; align-items: center; justify-content: center;
}
.colony-card-stamp span {
  font-family: var(--display); font-weight: 800; font-size: 8px; letter-spacing: 0.5px;
  color: var(--gb-mango-deep); text-align: center; line-height: 1.3;
}

/* Mobile: slide up from the bottom, one question per screen already, bigger targets */
@media (max-width: 640px) {
  .colony-overlay { align-items: flex-end; padding: 0; }
  .colony-modal {
    width: 100%; max-width: none; max-height: 92vh; border-radius: 24px 24px 0 0;
    padding: 40px 24px 28px;
    animation: colony-slide-up .25s ease-out;
  }
  .colony-option { min-height: 60px; font-size: 18px; }
  .colony-screen input, .colony-screen button[type="submit"] { min-height: 56px; }
}
@keyframes colony-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
