/*
 * The Foxy Club sign-up pop-up (smeehee-foxy-club).
 *
 * Self-contained: the theme's Tailwind build only contains classes it found in
 * the theme, so nothing here relies on it. Colours are the theme's forest and
 * autumn palettes; fonts are the theme's (Indie Flower headings, Open Sans
 * text, Barlow buttons), loaded by the theme on every page.
 */

.sfc-root[hidden],
.sfc-root [hidden] {
  display: none !important;
}

html.sfc-open,
html.sfc-open body {
  overflow: hidden;
}

.sfc-root {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: 'Open Sans', sans-serif;
  color: #4a3c2f; /* forest-900 */
}

.sfc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(52, 31, 19, 0.6); /* autumn-950 */
}

.sfc-dialog {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 30rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 2rem 1.75rem 1.5rem;
  background: #faf8f5; /* forest-50 */
  border-top: 6px solid #c38743; /* autumn-500 */
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(52, 31, 19, 0.35);
  animation: sfc-rise 0.25s ease-out;
}

.sfc-dialog:focus {
  outline: none;
}

@keyframes sfc-rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sfc-dialog {
    animation: none;
  }
}

.sfc-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #6e5840; /* forest-700 */
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.sfc-close:hover,
.sfc-close:focus-visible {
  background: #f2ede5; /* forest-100 */
  color: #4a3c2f;
}

/* "Free to join", above the form's heading. */
.sfc-view p.sfc-badge {
  display: inline-block;
  margin: 0 2rem 0.5rem 0;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #8c5a2e; /* autumn-700, as the heading: white on it is 5.8:1 (small text needs 4.5:1) */
  color: #ffffff;
  font-family: 'Barlow', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.sfc-title {
  margin: 0 2rem 0.75rem 0;
  font-family: 'Indie Flower', cursive;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  color: #8c5a2e; /* autumn-700 */
}

.sfc-view p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

.sfc-lead strong {
  color: #a86f37; /* autumn-600 */
}

.sfc-field {
  display: block;
  margin-bottom: 0.875rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

.sfc-field span {
  display: block;
  margin-bottom: 0.25rem;
}

.sfc-field input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5d9c8; /* forest-200 */
  border-radius: 0.5rem;
  background: #ffffff;
  font: inherit;
  font-weight: 400;
  color: #4a3c2f;
}

.sfc-field input:focus {
  outline: none;
  border-color: #c38743;
  box-shadow: 0 0 0 3px rgba(195, 135, 67, 0.25);
}

.sfc-consent {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin: 0.25rem 0 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  cursor: pointer;
}

.sfc-consent input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  accent-color: #c38743;
}

.sfc-consent a,
.sfc-view a {
  color: #8c5a2e;
  text-decoration: underline;
}

/* The honeypot: off-screen, out of the tab order, ignored by screen readers. */
.sfc-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.sfc-error {
  padding: 0.625rem 0.875rem;
  border-left: 4px solid #b42318;
  border-radius: 0.25rem;
  background: #fef3f2;
  color: #912018;
  font-size: 0.9375rem;
}

.sfc-submit,
.sfc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border: 2px solid #c38743;
  border-radius: 0.5rem;
  background: #c38743;
  color: #ffffff;
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.sfc-submit {
  width: 100%;
  margin-bottom: 0.75rem;
}

.sfc-submit:hover:not(:disabled),
.sfc-button:hover {
  background: #a86f37;
  border-color: #a86f37;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sfc-submit:focus-visible,
.sfc-button:focus-visible,
.sfc-close:focus-visible {
  outline: 3px solid #8c5a2e;
  outline-offset: 2px;
}

.sfc-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.sfc-button-outline {
  background: transparent;
  color: #8c5a2e;
}

.sfc-button-outline:hover {
  color: #ffffff;
}

.sfc-small {
  font-size: 0.8125rem !important;
  color: #6e5840;
}

.sfc-code {
  padding: 0.875rem 1rem;
  border: 2px dashed #c38743;
  border-radius: 0.5rem;
  background: #fef9f3; /* autumn-50 */
  font-family: 'Barlow', sans-serif;
  font-size: 1.75rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  color: #72492a; /* autumn-800 */
  user-select: all;
}

.sfc-status {
  color: #6e5840;
}

/* Phones: a sheet from the bottom of the screen. */
@media (max-width: 480px) {
  .sfc-root {
    align-items: flex-end;
    padding: 0;
  }

  .sfc-dialog {
    max-width: none;
    max-height: 92vh;
    padding: 1.75rem 1.25rem 1.25rem;
    border-radius: 1rem 1rem 0 0;
  }

  .sfc-title {
    font-size: 1.75rem;
  }
}
