/* Teeny Golf mycourse form */
:root {
  --purple: #6A2C9A;
  --purple-dark: #582282;
  --purple-soft: #f4eafc;
  --green: #1D9944;
  --green-dark: #167A36;
  --green-soft: #EDFAE8;
  --light-green: #D6F2D1;
  --orange: #F07A30;
  --ink: #1A3821;
  --ink-soft: #3A5542;
  --muted: #5a6e5e;
  --line: #d7e5d4;
  --card: #ffffff;
  --bg: #f3f8f1;
  --warn: #8a5a00;
  --warn-bg: #fff6e0;
  --warn-line: #f0d48a;
  --danger: #a12626;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(26, 56, 33, .08);
}
@font-face {
  font-family: "TG Poppins";
  src: url("../assets/fonts/Poppins-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "TG Poppins";
  src: url("../assets/fonts/Poppins-Medium.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "TG Poppins";
  src: url("../assets/fonts/Poppins-SemiBold.woff") format("woff");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "TG Poppins";
  src: url("../assets/fonts/Poppins-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "TG Poppins", "Segoe UI", "Helvetica Neue", Avenir, system-ui, sans-serif;
  line-height: 1.45;
}
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }

.site-header {
  background: linear-gradient(#27ab52, var(--green-dark));
  color: #fff;
  border-bottom: 6px solid var(--purple);
}
.site-header .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  background: #fff;
}
.wordmark { height: 36px; width: auto; }
.brand { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; color: inherit; text-decoration: none; border-radius: 12px; }
.brand:hover, .brand:visited, .brand:active { color: inherit; text-decoration: none; }
.brand:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.kicker-top {
  margin: 0;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: .92;
}
.hdr-title { font-size: 18px; font-weight: 700; }

.demo-banner {
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-line);
  color: var(--warn);
  text-align: center;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 20px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  main { grid-template-columns: 1fr; padding-top: 16px; }
  .preview-col { position: static !important; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.panel h2 { font-size: 16px; color: var(--purple); margin-bottom: 12px; }
.lead { color: var(--ink-soft); margin: 0 0 14px; font-size: 0.98rem; }

.field { margin: 0 0 12px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.field .hint, .hint {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: 3px;
}
input[type="text"], input[type="email"], input[type="number"], select {
  width: 100%;
  border: 1px solid #c9d8c7;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  outline: none;
}
input:focus, select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(106,44,154,.15); }
input::placeholder { color: #8aa08a; opacity: 1; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

.course-panel .course-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.course-panel h2 { margin: 0; }
.course-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.par-total {
  font-size: 13px; color: var(--ink-soft); font-weight: 600;
  background: var(--green-soft); border-radius: 999px;
  padding: 4px 10px;
}
.linkish {
  background: none; border: none; color: var(--purple);
  font-weight: 600; cursor: pointer; padding: 4px 0;
  text-decoration: underline;
}
.linkish:hover { color: var(--purple-dark); }
.linkish.danger { color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; padding: 11px 18px;
  font-weight: 700; cursor: pointer;
  background: var(--green); color: #fff;
  box-shadow: 0 4px 0 var(--green-dark);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); box-shadow: 0 3px 0 var(--green-dark); }
.btn.secondary { background: var(--purple); box-shadow: 0 4px 0 var(--purple-dark); }
.btn.ghost {
  background: #fff; color: var(--purple);
  border: 2px solid var(--purple); box-shadow: none;
}
.btn:disabled, .btn[aria-disabled="true"] {
  background: #c9c9c9; color: #666; box-shadow: none;
  cursor: not-allowed; filter: none; transform: none; border-color: #c9c9c9;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.holes { width: 100%; border-collapse: collapse; font-size: 13px; }
.holes th, .holes td { padding: 3px 4px; text-align: left; }
.holes th { font-size: 11px; color: var(--muted); font-weight: 600; }
.holes .num { width: 44px; color: var(--muted); font-weight: 700; text-align: center; }
.holes .par { width: 72px; }
.holes .par input { padding: 5px 6px; text-align: center; }
.holes .total-row td { padding-top: 8px; font-weight: 700; }
.split-label {
  color: var(--muted); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 4px 2px !important;
}

.placeholder {
  border: 2px dashed #c9d8c7;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--muted);
  padding: 16px;
  text-align: center;
  font-weight: 600;
}
.placeholder .ph-title { color: var(--ink-soft); font-weight: 700; margin: 0 0 4px; }
.pay-box {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: var(--purple-soft);
  border-radius: 12px;
  padding: 14px 16px;
}
.price { font-size: 1.4rem; font-weight: 800; color: var(--purple); }
.price span { font-size: 12px; font-weight: 600; color: var(--purple-dark); display: block; }

.disclaimer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.disclaimer input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--purple); }

.error {
  background: #fdecec;
  color: var(--danger);
  border: 1px solid #f3c4c4;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  display: none;
  margin-bottom: 10px;
}
.error.show { display: block; }

.qr-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--warn-line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin: 8px 0 10px;
}
.qr-warn[hidden] { display: none; }

.preview-col { position: sticky; top: 16px; }
.preview-frame {
  background: var(--green-soft);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--line);
}
.preview-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.preview-tabs button {
  flex: 1; border: none; background: #fff; color: var(--purple);
  font-weight: 700; font-size: 12px; padding: 6px 8px;
  border-radius: 999px; cursor: pointer;
}
.preview-tabs button[aria-selected="true"] { background: var(--purple); color: #fff; }
#preview-canvas {
  width: 100%; height: auto; border-radius: 8px;
  box-shadow: var(--shadow); background: #fff; display: block;
}
.qr-meta { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.url-box {
  margin-top: 10px; word-break: break-all; font-size: 11.5px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px; color: var(--ink-soft);
  white-space: pre-wrap;
}

footer { text-align: center; color: var(--muted); font-size: .9rem; padding: 10px 20px 30px; }
footer a { color: var(--purple); }

[hidden], .btn[hidden] { display: none !important; }

/* Logo upload + app home-screen preview */
.logo-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.logo-fields { flex: 1 1 260px; min-width: 0; }
.logo-fields input[type=file] { padding: 10px; background: #fff; }
.small-print { font-size: 12px; }
.logo-phone {
  flex: 0 0 180px; width: 180px; border-radius: 26px; overflow: hidden;
  border: 6px solid #1A3821; background: var(--bg); box-shadow: var(--shadow);
}
.lp-band { background: var(--green); padding: 10px 14px 8px; border-bottom: 3px solid var(--purple); text-align: center; }
.lp-band img { width: 100%; height: auto; display: block; }
/* Same framing as the app (VenueLogoFrame): white-to-light-green card, logo inset 7% at the sides,
   6% at the top, and clear of the bottom pill strip (~16%), with a soft shadow. */
.lp-spot {
  margin: 0; aspect-ratio: 1 / 1; background: linear-gradient(#fff, #f2faf0); display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-bottom: 1px solid var(--line); position: relative;
}
.lp-spot img { width: 100%; height: 100%; object-fit: contain; padding: 6% 7% 16%; box-sizing: border-box;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.10)); }
.lp-spot.has-logo::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 4%; height: 7%;
  background: linear-gradient(90deg, rgba(110,46,160,.85) 0 30%, transparent 30% 52%, rgba(110,46,160,.85) 52% 70%, transparent 70% 72%, rgba(110,46,160,.85) 72%);
  border-radius: 99px; opacity: .55; }
.spec { background: #f6faf4; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 13px; color: var(--ink-soft, #3b4a3f); }
.spec-title { margin: 0 0 4px; font-weight: 700; color: var(--purple); font-size: 13px; }
.spec ul { margin: 0; padding-left: 18px; }
.spec li { margin: 2px 0; line-height: 1.4; }
.warn { background: #fff7e0; border: 1px solid #f0d27a; color: #6b4d00; border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 13px; line-height: 1.4; }
.warn p { margin: 0; }
.warn p + p { margin-top: 6px; }
.lp-empty { color: var(--muted); font-size: 13px; text-align: center; line-height: 1.35;
  border: 2px dashed var(--line); border-radius: 12px; padding: 22px 12px; margin: 14px; }
.lp-caption { font-size: 12px; font-weight: 600; color: var(--purple); text-align: center; padding: 8px 8px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#logo-error { display: none; }

.map-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(0,0,0,.08); }
.map-block h3 { margin: 0 0 10px; font-size: 17px; }
.map-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.map-fields { flex: 1 1 260px; min-width: 0; }
.map-fields input[type=file] { padding: 10px; background: #fff; }
.map-preview { flex: 0 0 180px; width: 180px; height: 140px; border-radius: 14px; background: #f6f7f4;
  border: 1px dashed rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.map-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.map-pdf { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; text-align: center; }
.map-pdf[hidden] { display: none; }
.map-pdf-icon { background: var(--purple); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .05em;
  padding: 10px 12px; border-radius: 8px; }
.map-pdf-name { font-size: 12px; color: var(--muted); word-break: break-word; max-width: 160px; }
#map-error { display: none; }

/* Course maps: one row per course */
.map-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; background: #fff; }
.map-item.is-removed { background: #faf7fc; }
.map-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.map-item-title { margin: 0; font-size: 15px; color: var(--purple); }
.map-course-field select { font-weight: 600; }
.map-course-field[hidden], .map-for[hidden], .map-row[hidden], .map-removed[hidden] { display: none !important; }
.map-for { margin: 0 0 8px; font-weight: 600; font-size: 14px; }
.map-error { display: none; }
.map-removed { margin: 0; }

/* Course maps: make the course each map belongs to unmistakable (v20261119d) */
.map-item-headtext { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.map-badge { display: inline-block; background: var(--purple); color: #fff; font-weight: 800; font-size: 14px;
  padding: 5px 12px; border-radius: 99px; line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; }
.map-badge.is-missing, .map-caption.is-missing { background: #fff3cd; color: #7a5600; border: 1px solid #f0d27a; }
.map-item-title { font-size: 17px; color: var(--ink, #1f2a22); }
.map-item.needs-course { border-color: #f0d27a; box-shadow: 0 0 0 3px rgba(240,210,122,.35); }
.map-course-field label { font-size: 15px; font-weight: 700; }
.map-course-field select { font-size: 17px; font-weight: 700; min-height: 48px; border: 2px solid var(--purple); }
.map-preview-col { flex: 0 0 180px; width: 180px; display: flex; flex-direction: column; gap: 6px; }
.map-preview-col .map-preview { flex: none; }
.map-caption { font-size: 12px; font-weight: 700; color: var(--purple); text-align: center; background: #f4eafc;
  border-radius: 99px; padding: 4px 8px; overflow-wrap: anywhere; }
.map-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  background: #eee; color: #555; white-space: nowrap; }
.map-tag.has-map { background: #f4eafc; color: var(--purple); }
@media (max-width: 520px) {
  .map-preview-col { flex: 1 1 100%; width: 100%; }
  .map-preview-col .map-preview { width: 100%; }
}

/* Course panel "+ Add map" button and map box highlight (v20261119e) */
button.map-tag { border: 1px solid transparent; cursor: pointer; font-family: inherit; }
button.map-tag:not(.has-map) { background: var(--purple); color: #fff; }
button.map-tag:not(.has-map):hover { background: var(--purple-dark); }
button.map-tag.has-map { background: #f4eafc; color: var(--purple); border-color: #dcc7ef; }
button.map-tag:focus-visible { outline: 3px solid rgba(106,44,154,.4); outline-offset: 2px; }
@keyframes tg-map-flash { 0% { box-shadow: 0 0 0 0 rgba(106,44,154,.55); } 100% { box-shadow: 0 0 0 14px rgba(106,44,154,0); } }
.map-item.flash { animation: tg-map-flash 0.8s ease-out 2; border-color: var(--purple); }
