/* =====================
   CONTRIBUTE PAGE
   ===================== */
.contributeWrap {
  max-width: 760px;
  width: calc(100% - 32px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---- teaser strip: recent approved submissions + trust stat ---- */
.teaserStrip {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.teaserStat {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #8f3f45;
}

.teaserRow {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.teaserThumb {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.62);
  box-shadow: 0 8px 20px rgba(0,0,0,0.14);
  background: #e7ded0;
}

.teaserThumb img,
.teaserThumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ---- form as numbered steps, each its own floating card ---- */
.formStep {
  display: flex;
  gap: 16px;
  border-radius: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(255,255,255,0.62);
  background: rgba(255,255,255,0.46);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(60,50,40,0.1);
}

.stepBadge {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #8f3f45;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  font-family: "Reem Kufi", sans-serif;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 6px 14px rgba(98,19,19,0.35);
}

.stepBody {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding-top: 3px;
}

.introCard {
  display: flex;
  align-items: center;
  gap: 16px;
}

.introIcon {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(177, 137, 80, 0.18);
  color: #8f3f45;
  font-size: 18px;
}

.introCard p,
#verifyIntro {
  margin: 0;
  color: #36342e;
  text-shadow: 0 1px 2px rgba(255,255,255,0.55);
  line-height: 1.85;
}

.formCard[hidden] {
  display: none;
}

.formCard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 26px;
}

/* contributeForm's steps are their own floating cards (see .formStep),
   so the form itself carries no card chrome of its own. */
#contributeForm.formCard {
  padding: 0;
}

#verifyForm {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}
#verifyForm .introIcon { margin-inline-end: 2px; }
#verifyForm #verifyIntro { flex: 1 1 220px; }
#verifyForm .field { flex: 1 1 160px; }
#verifyForm #submitBtn,
#verifyForm #verifyBtn { flex: none; }
#verifyForm .formMsg { flex-basis: 100%; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.field label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 14px;
  color: #2f2f2f;
  text-shadow: 0 1px 2px rgba(255,255,255,0.55);
}

.fieldIcon {
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: #a1783f;
}

.fieldHint {
  margin: 0;
  font-size: 12.5px;
  color: #55524a;
  opacity: .85;
}

.field .input:focus {
  border-color: rgba(143,63,69,0.55);
  box-shadow: 0 0 0 3px rgba(143,63,69,0.14);
}

.codeInput {
  letter-spacing: 6px;
  font-weight: 700;
  text-align: center;
  max-width: 160px;
}

/* ---- custom file picker ---- */
.fileDrop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  border-radius: 14px;
  border: 1.5px dashed rgba(143,63,69,0.4);
  background: rgba(255,255,255,0.32);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}
.fileDrop:hover {
  border-color: rgba(143,63,69,0.65);
  background: rgba(255,255,255,0.48);
}
.fileDrop.has-file {
  border-style: solid;
  border-color: rgba(63,143,90,0.55);
  background: rgba(63,143,90,0.1);
}

.fileDropInput {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.fileDropInput:focus-visible ~ .fileDropIcon {
  outline: 2px solid rgba(143,63,69,0.55);
  outline-offset: 3px;
  border-radius: 999px;
}

.fileDropIcon {
  font-size: 24px;
  color: #8f3f45;
}
.fileDrop.has-file .fileDropIcon { color: #3f8f5a; }

.fileDropText {
  font-size: 13.5px;
  color: #4a473e;
  font-weight: 600;
}

/* ---- place suggestions dropdown ---- */
.suggestions {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.62);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(60,50,40,0.22);
  z-index: 20;
}

.suggestions button {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: right;
  padding: 9px 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #2f2f2f;
}

.suggestions button:hover,
.suggestions button.is-active {
  background: rgba(177,137,80,0.18);
}

.suggestions .sType {
  font-size: 11.5px;
  color: #6b6656;
}

.suggestions .sEmpty {
  padding: 10px 14px;
  color: #6b6656;
  font-size: 13px;
}

/* ---- terms box ---- */
.termsBox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.32);
  border: 1px solid rgba(255,255,255,0.5);
}

.termsText {
  max-height: 130px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.8;
  color: #4a473e;
  padding-inline-end: 4px;
}

.termsCheck {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #2f2f2f;
  cursor: pointer;
}

.termsCheck input {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: #8f3f45;
  flex: none;
}

/* ---- submit + status ---- */
#submitBtn,
#verifyBtn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid rgba(93,40,43,0.42);
  background: #8f3f45;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
#submitBtn:hover,
#verifyBtn:hover { background: #7c3339; transform: translateY(-1px); }
#submitBtn:disabled,
#verifyBtn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.formMsg {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  min-height: 1.2em;
}
.formMsg.is-success { color: #3d5a32; font-weight: 700; }
.formMsg.is-error   { color: #b23a3a; font-weight: 700; }

.showNameChoice {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 4px;
}

.radioOption {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #4a473e;
  cursor: pointer;
}

.radioOption input {
  width: 17px;
  height: 17px;
  accent-color: #8f3f45;
  flex: none;
}

/* ---- gallery of approved community submissions ---- */
.galleryWrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.galleryTitle {
  margin: 0;
  font-size: 20px;
  color: #2b2a26;
}

.galleryEmpty {
  margin: 0;
  color: #55524a;
  font-size: 14px;
}

.galleryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.galleryCard {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(255, 255, 255, .62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
}

.galleryMedia {
  aspect-ratio: 4 / 3;
  background: #e7ded0;
}

.galleryMedia img,
.galleryMedia video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.galleryInfo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
}

.galleryPlace {
  font-weight: 800;
  font-size: 14px;
  color: #2b2a26;
}

.galleryStars {
  display: flex;
  align-items: center;
  gap: 8px;
}

.galleryStarsRow {
  display: flex;
  gap: 2px;
}

.galleryStarsRow .star {
  background: none;
  border: none;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  color: rgba(98, 83, 64, .3);
  cursor: pointer;
}

.galleryStarsRow:not(.is-rated) .star:hover {
  color: #b89b5e;
}

.galleryStarsRow .star.is-filled {
  color: #b89b5e;
}

.galleryStarsRow.is-rated .star {
  cursor: default;
}

.galleryRatingCount {
  font-size: 11.5px;
  color: #6b6659;
}

.galleryContributor {
  font-size: 12px;
  color: #55524a;
}

@media (max-width: 560px) {
  .contributeWrap { width: calc(100% - 20px); }
  .formCard { padding: 20px 18px; }
  #submitBtn,
  #verifyForm { align-self: stretch; }
  #verifyForm { flex-direction: column; align-items: stretch; }
  #verifyForm #submitBtn,
  #verifyForm #verifyBtn { align-self: stretch; justify-content: center; }
}
