/* FSR v4 — Generate Kindness Free Sticker Request form */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fffef8;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
.nav {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 0.875rem 0;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; text-decoration: none; }
.nav-brand img { height: 36px; border-radius: 6px; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: #333; text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.nav-links a:hover { color: #D62828; }

/* Main layout */
.fsr-page {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem 5rem;
}

/* Card container */
.fsr-container { width: 100%; max-width: 520px; }

.fsr-form-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.25rem 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
}

/* Header */
.fsr-header { text-align: center; margin-bottom: 1.75rem; }
.fsr-sticker-icon { width: 52px; height: 52px; border-radius: 8px; margin-bottom: 0.625rem; }
.fsr-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.375rem; }
.fsr-subhead { color: #666; font-size: 0.9375rem; margin: 0; }

/* Form structure */
.form-group { margin-bottom: 1.125rem; }
.form-row { display: flex; gap: 0.75rem; }
.form-row .form-group { flex: 1; min-width: 0; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #333;
  margin-bottom: 0.375rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 44px;
  font-family: inherit;
}

input::placeholder, textarea::placeholder { color: #9ca3af; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #D62828;
  box-shadow: 0 0 0 3px rgba(214,40,40,0.12);
}

select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.25rem; }

textarea { resize: vertical; min-height: 72px; }

.label-optional { font-weight: 400; color: #888; }

/* Errors */
.form-error {
  padding: 0.75rem 1rem;
  background: #fdf2f2;
  border: 1px solid #D62828;
  border-radius: 8px;
  color: #c0392b;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.field-error { color: #c0392b; font-size: 0.8125rem; margin-top: 0.25rem; }
.field-note { font-size: 0.8125rem; color: #888; margin-top: 0.25rem; }
.field-note a { color: #D62828; text-decoration: none; }
.field-note a:hover { text-decoration: underline; }

/* Autocomplete */
.autocomplete-wrapper { position: relative; }
#pacContainer {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.pac-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9375rem;
  color: #333;
  line-height: 1.4;
}
.pac-item:last-child { border-bottom: none; }
.pac-item:hover { background: #fdf2f2; }
.pac-item-query { font-size: 0.9375rem; color: #333; }
.pac-matched { color: #D62828; font-weight: 600; }
.pac-icon { display: none; }
.addr-city { display: block; color: #666; font-size: 0.8125rem; margin-top: 0.125rem; }

/* White label box */
.address-label-box {
  background: #fff;
  border: 2px solid #111;
  padding: 1rem 18%;
  min-height: 80px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
#addressLabelText {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9375rem;
  color: #111;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Confirm step */
#confirmStep { margin-bottom: 1.25rem; }
.confirm-prompt { font-size: 0.9375rem; color: #333; margin-bottom: 0.625rem; }
.confirm-btns { display: flex; gap: 0.75rem; }

/* SASE fallback */
.sase-notice {
  padding: 1rem 1.125rem;
  background: #fff8f0;
  border: 1px solid #f6d860;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}
.sase-title { font-size: 0.9375rem; color: #92400e; margin-bottom: 0.625rem; font-weight: 600; }
.sase-address {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 0.875rem;
}

/* Buttons */
.btn {
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  font-family: inherit;
  min-height: 44px;
  line-height: 1.4;
}
.btn-primary { background: #D62828; color: #fff; border-color: #D62828; }
.btn-primary:hover { background: #b71c1c; border-color: #b71c1c; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: #fff; color: #D62828; border-color: #D62828; }
.btn-secondary:hover { background: #fdf2f2; }
.btn-outline {
  background: #fff;
  color: #92400e;
  border-color: #f6d860;
  border-width: 1.5px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-family: inherit;
}
.btn-outline:hover { background: #fefce8; }
.btn-full { width: 100%; }

/* Success */
.fsr-success-wrapper { text-align: center; }
.fsr-success-inner {
  background: #fff;
  border-radius: 12px;
  padding: 3rem 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
  max-width: 440px;
  margin: 0 auto;
}
.fsr-success-icon {
  width: 96px;
  height: 96px;
  background: #fdf2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.fsr-success-inner h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.75rem; color: #111; }
.fsr-success-inner p { color: #555; font-size: 1rem; margin: 0; line-height: 1.6; }

/* Share section */
.share-section { margin-top: 2rem; text-align: center; }
.share-heading { font-size: 1.125rem; font-weight: 700; color: #111; margin: 0 0 0.25rem; }
.share-subtext { font-size: 0.875rem; color: #666; margin: 0 0 1rem; }
.share-btns { display: flex; gap: 0.75rem; justify-content: center; }
.share-btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1.125rem; border-radius: 8px; font-weight: 600; font-size: 0.9375rem; text-decoration: none; transition: opacity 0.15s; font-family: inherit; }
.share-btn:hover { opacity: 0.85; }
.share-btn-twitter { background: #000; color: #fff; }
.share-btn-facebook { background: #1877F6; color: #fff; }

/* Footer */
.footer-simple {
  padding: 1.5rem 0;
  text-align: center;
  border-top: 1px solid #eee;
  background: #fff;
}
.footer-simple p { color: #999; font-size: 0.875rem; }

/* Mobile */
@media (max-width: 480px) {
  .fsr-page { padding: 1.5rem 0.75rem 4rem; }
  .fsr-form-card { padding: 1.5rem 1.25rem; border-radius: 8px; }
  .fsr-header h1 { font-size: 1.25rem; }
  .form-row { flex-direction: column; }
  .form-row .form-group { flex: none; width: 100%; }
  .address-label-box { padding: 0.875rem 6%; }
  #addressLabelText { font-size: 0.875rem; }
  .share-btns { flex-direction: column; align-items: center; }
}