/* Advent With Friends - /code 10-Character Christmas Code Lookup Card */

.awf-code-app {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--font-body, "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif);
  color: var(--ink, #221c16);
}

.awf-code-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fffdf8 0%, #f8eed8 100%);
  border: 1.5px solid #d7b878;
  border-radius: 18px;
  padding: 36px 32px 30px;
  box-shadow: 0 20px 46px rgba(8, 22, 18, 0.32), inset 0 0 0 4px rgba(255, 253, 248, 0.72);
}

.awf-code-stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    135deg,
    #b8333a 0 12px,
    #fffdf8 12px 18px,
    #1f6a46 18px 30px,
    #fffdf8 30px 36px,
    #c89b3c 36px 44px,
    #fffdf8 44px 50px
  );
}

.awf-code-seal {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #dc4a52, #981f27 82%);
  color: #fffaf0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 12px rgba(130, 26, 33, 0.34), inset 0 0 0 2.5px rgba(255, 240, 204, 0.42);
}

.awf-code-head {
  text-align: center;
}

.awf-code-badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.awf-code-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #1b5e3f;
  color: #fffaf0;
}

.awf-code-pill-soft {
  background: #f5ebd7;
  color: #6b4e24;
  border: 1px solid #e1cfa9;
}

.awf-code-heading {
  margin: 0 0 8px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(24px, 3vw, 31px);
  line-height: 1.18;
  font-weight: 600;
  color: #221c16;
}

.awf-code-lead {
  margin: 0 auto 22px;
  max-width: 52ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: #5c5347;
}

.awf-code-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.awf-code-label {
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b5e4b;
}

.awf-code-input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.awf-code-input {
  width: 100%;
  min-height: 62px;
  padding: 14px 72px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #162e20;
  background: #ffffff;
  border: 2px solid #d5bc85;
  border-radius: 14px;
  box-shadow: inset 0 2px 6px rgba(45, 32, 16, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.awf-code-input::placeholder {
  font-family: var(--font-body, "Plus Jakarta Sans", sans-serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #8a7f6f;
}

.awf-code-input:focus {
  outline: none;
  border-color: #1b6341;
  box-shadow: 0 0 0 4px rgba(27, 99, 65, 0.16);
}

.awf-code-clear {
  position: absolute;
  right: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #d5c4a2;
  background: #f6eedc;
  color: #4f4638;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.awf-code-clear:hover {
  background: #ece1ce;
}

.awf-code-hint {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: #6c6152;
}

.awf-code-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.awf-code-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  min-width: 240px;
  padding: 12px 30px;
  border: 1px solid #8e2029;
  border-radius: 12px;
  background: linear-gradient(180deg, #c73c44 0%, #9b222a 100%);
  color: #fffaf0;
  font-family: var(--font-body, "Plus Jakarta Sans", sans-serif);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(146, 36, 42, 0.28);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.awf-code-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(146, 36, 42, 0.34);
}

.awf-code-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.awf-code-secondary-link {
  font-size: 14px;
  font-weight: 700;
  color: #1b6341;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.awf-code-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  border: 1px solid transparent;
  text-align: center;
}

.awf-code-status.is-error {
  background: #fdf0f1;
  border-color: #ebc2c5;
  color: #7d1e24;
}

.awf-code-status.is-success {
  background: #edf7f1;
  border-color: #b7dec7;
  color: #154e33;
}

.awf-code-status.is-info {
  background: #fbf5e7;
  border-color: #e4cfa2;
  color: #5b431c;
}

.awf-code-choice {
  margin-top: 18px;
  padding: 20px;
  border-radius: 14px;
  background: #fffdf8;
  border: 1.5px solid #dec58e;
  text-align: center;
}

.awf-code-choice-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #92242a;
  margin-bottom: 4px;
}

.awf-code-choice-head h3 {
  margin: 0 0 6px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 21px;
  color: #221c16;
}

.awf-code-choice-head p {
  margin: 0 0 14px;
  font-size: 14px;
  color: #5c5347;
}

.awf-code-choice-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.awf-code-btn-join,
.awf-code-btn-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.awf-code-btn-join {
  background: #1b6341;
  color: #fffaf0;
}

.awf-code-btn-join:hover {
  background: #134a30;
  color: #fffaf0;
}

.awf-code-btn-open {
  background: #ffffff;
  color: #1b6341;
  border: 1.5px solid #1b6341;
}

.awf-code-btn-open:hover {
  background: #eef6f1;
}

@media (max-width: 680px) {
  .awf-code-card {
    padding: 26px 16px 22px;
  }

  .awf-code-input {
    padding: 12px 58px 12px 14px;
    font-size: 17px;
    letter-spacing: 0.08em;
  }

  .awf-code-submit {
    width: 100%;
    min-width: 0;
  }

  .awf-code-choice-btns .awf-code-btn-join,
  .awf-code-choice-btns .awf-code-btn-open {
    width: 100%;
  }
}

.awf-code-app [hidden],
.awf-code-app .awf-code-clear[hidden],
.awf-code-app .awf-code-status[hidden],
.awf-code-app .awf-code-choice[hidden] {
  display: none;
}
