/* BaseLocal · Event Submission Prototype · shared styles */

:root {
  --terracotta: #C2604A;
  --terracotta-deep: #A84E3B;
  --espresso: #2C2421;
  --charcoal: #444444;
  --gray: #797979;
  --silver: #999999;
  --cream: #FAF6F4;
  --border: #E8E0DC;
  --white: #FFFFFF;
  --green: #2D7A2D;
  --green-bg: #EEF7ED;
  --red: #C0392B;
  --red-bg: #FBEAE7;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.7s;
  --stagger: 80ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', Helvetica, Arial, sans-serif;
  color: var(--charcoal);
  background: var(--white);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--terracotta); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }

/* ===== Header (matches baselocal.com) ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky; top: 0; z-index: 100;
}
.site-header-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-header .logo-link { display: flex; align-items: center; text-decoration: none; }
.site-header img { height: 28px; width: auto; display: block; }
.site-header nav {
  display: flex; align-items: center; gap: 32px;
}
.site-header nav a {
  color: var(--gray);
  font-family: 'Lato', sans-serif; font-weight: 500; font-size: 15px;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.site-header nav a:hover { color: var(--terracotta); text-decoration: none; }
.site-header nav a.active {
  color: var(--terracotta); font-weight: 700;
}
.site-header nav a.active::after {
  content: ''; position: absolute;
  bottom: -6px; left: 0; right: 0; height: 2px;
  background: var(--terracotta); border-radius: 1px;
}
@media (max-width: 600px) {
  .site-header-inner { padding: 16px 20px; }
  .site-header img { height: 22px; }
  .site-header nav { gap: 20px; }
  .site-header nav a { font-size: 14px; }
}

/* ===== Step indicator ===== */
.step-indicator {
  display: flex; justify-content: space-between; align-items: flex-start;
  max-width: 600px; margin: 32px auto 16px; padding: 0 16px;
  position: relative;
}
.step-indicator .step {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; position: relative; z-index: 1;
}
.step-indicator .circle {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--gray);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.step-indicator .label {
  font-size: 13px; font-weight: 500; margin-top: 8px; color: var(--gray);
  text-align: center;
}
.step-indicator .step.complete .circle {
  background: var(--terracotta); border-color: var(--terracotta); color: var(--white);
}
.step-indicator .step.complete .label { color: var(--espresso); font-weight: 700; }
.step-indicator .step.current .circle {
  background: var(--terracotta); border-color: var(--terracotta); color: var(--white);
  box-shadow: 0 0 0 4px rgba(194, 96, 74, 0.15);
}
.step-indicator .step.current .label { color: var(--terracotta); font-weight: 700; }
.step-indicator .connector {
  position: absolute; top: 13px; height: 2px; z-index: 0;
  background: var(--border);
}
.step-indicator .connector.complete { background: var(--terracotta); }

/* Mobile step indicator collapses */
@media (max-width: 600px) {
  .step-indicator { display: none; }
  .step-indicator-mobile {
    display: inline-block;
    background: var(--terracotta); color: var(--white);
    font-weight: 700; font-size: 13px;
    padding: 6px 14px; border-radius: 999px;
    margin: 24px auto;
  }
  .step-indicator-mobile-wrap { text-align: center; }
}
.step-indicator-mobile { display: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; cursor: pointer;
  font-family: 'Lato', sans-serif; font-weight: 700;
  border-radius: 6px; border: none;
  padding: 14px 32px; font-size: 16px;
  text-decoration: none;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn.primary {
  background: var(--terracotta); color: var(--white);
}
.btn.primary:hover {
  background: var(--terracotta-deep);
  box-shadow: 0 4px 14px rgba(194, 96, 74, 0.35);
  text-decoration: none;
}
.btn.primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(194, 96, 74, 0.25);
}
.btn.secondary {
  background: var(--white); color: var(--terracotta);
  border: 2px solid var(--terracotta);
}
.btn.secondary:hover { background: var(--cream); text-decoration: none; }
.btn.large { padding: 16px 40px; font-size: 18px; }
.btn.small { padding: 10px 20px; font-size: 14px; }
.btn:disabled, .btn.disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
  box-shadow: none; background: var(--gray);
}

/* ===== Footer (dark, multi-column) ===== */
.site-footer {
  background: var(--espresso);
  color: #B5A89C;
  padding: 60px 24px 28px;
  font-size: 14px;
  line-height: 1.6;
}
.site-footer-inner {
  max-width: 1120px; margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
}
.footer-brand .footer-logo {
  height: 28px; margin-bottom: 16px; display: block;
}
.footer-tagline {
  color: #B5A89C; font-size: 14px; line-height: 1.55; max-width: 320px; margin: 0;
}
.footer-col h4 {
  font-family: 'Lato', sans-serif;
  font-size: 12px; font-weight: 900;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--white);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  color: #B5A89C; font-weight: 500;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--terracotta); text-decoration: none; }
.footer-col .footer-contact {
  margin-bottom: 14px;
}
.footer-col .footer-contact-label {
  display: block;
  color: #8A7E73;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 2px;
}
.footer-col .footer-contact a {
  display: inline; padding: 0;
}
.footer-bottom {
  font-size: 12px; color: #8A7E73;
  margin: 0;
}
@media (max-width: 720px) {
  .site-footer { padding: 48px 24px 22px; }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px 28px;
    padding-bottom: 28px;
  }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ===== Form primitives ===== */
.field { margin-bottom: 18px; }
.field-label {
  font-weight: 700; font-size: 14px;
  color: var(--espresso); margin-bottom: 6px; display: block;
}
.field-label .req { color: var(--terracotta); }
.helper {
  font-size: 13px; color: var(--gray); margin-top: 6px; line-height: 1.5;
}
.error {
  font-size: 13px; color: var(--red); margin-top: 6px; line-height: 1.5;
  font-weight: 500;
}
.error::before { content: '⚠ '; }

input[type='text'], input[type='email'], input[type='tel'], input[type='url'],
input[type='date'], input[type='time'], input[type='number'],
select, textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  min-height: 44px;
  font-family: 'Lato', sans-serif; font-size: 16px;
  color: var(--charcoal);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--silver); }
input:hover, select:hover, textarea:hover { border-color: var(--gray); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
  border-color: var(--terracotta);
  background: var(--cream);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23C2604A' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.char-counter {
  font-size: 13px; color: var(--gray); text-align: right;
  margin-top: 6px; font-weight: 500;
}
.char-counter.near-limit { color: var(--terracotta); }
.char-counter.over-limit { color: var(--red); }

/* Form section header */
.form-section-header {
  font-family: 'Bitter', Georgia, serif; font-weight: 700;
  font-size: 22px; color: var(--espresso);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin: 32px 0 24px;
}
.form-section-header:first-of-type { margin-top: 0; }
.form-section-header .step-num {
  font-family: 'Bitter', serif;
  color: var(--terracotta); margin-right: 8px;
}

/* Two-up form rows */
.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* ===== Inline alert ===== */
.alert {
  padding: 16px 20px; border-radius: 4px;
  font-size: 15px; font-weight: 500; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 12px;
  margin: 16px 0;
}
.alert .icon { font-weight: 700; flex-shrink: 0; }
.alert.info { background: var(--cream); color: var(--espresso); border-left: 3px solid var(--terracotta); }
.alert.info .icon { color: var(--terracotta); }
.alert.error { background: var(--red-bg); color: var(--red); border-left: 3px solid var(--red); }
.alert.error .icon { color: var(--red); }
.alert.success { background: var(--green-bg); color: var(--green); border-left: 3px solid var(--green); }
.alert.success .icon { color: var(--green); }
.alert .body { flex: 1; }
.alert .title { font-weight: 700; margin-bottom: 2px; }
.alert .actions { margin-top: 6px; }
.alert .actions a {
  font-size: 14px; font-weight: 700; color: var(--terracotta);
}

/* ===== Category pill selector ===== */
.pill-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pill {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 36px;
  font-family: 'Lato', sans-serif; font-size: 15px; font-weight: 500;
  color: var(--charcoal);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.pill:hover { background: var(--cream); }
.pill.selected {
  background: var(--terracotta); color: var(--white); border-color: var(--terracotta);
}
.pill:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

/* ===== Location multi-select ===== */
.loc-search-wrap { position: relative; margin-bottom: 8px; }
.loc-search-wrap::before {
  content: ''; position: absolute; left: 14px; top: 50%;
  width: 18px; height: 18px; transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23797979' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.5-4.5'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}
input.loc-search { padding-left: 48px; }

.loc-actions {
  display: flex; gap: 8px; margin-top: 8px; margin-bottom: 14px;
}
.loc-actions .btn {
  font-size: 13px; padding: 6px 12px;
  border-radius: 6px;
}

.loc-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 12px 0;
}
.loc-chips:empty { display: none; }
.chip {
  background: var(--cream);
  border: 1px solid var(--border);
  color: var(--espresso);
  font-size: 14px; font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip .x {
  cursor: pointer; color: var(--gray);
  font-size: 16px; line-height: 1; padding: 4px;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: -6px;
}
.chip .x:hover { color: var(--terracotta); background: var(--white); }

.loc-list {
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--white);
  position: relative;
}
.loc-counter {
  position: sticky; top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 13px; font-weight: 700;
  color: var(--terracotta);
  text-align: right;
  z-index: 2;
}
.loc-group-header {
  position: sticky; top: 38px;
  background: var(--cream);
  font-size: 13px; font-weight: 700;
  color: var(--espresso);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 6px 14px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.loc-group-header .select-all {
  color: var(--terracotta); font-weight: 700; font-size: 12px;
  cursor: pointer; text-transform: none; letter-spacing: 0;
}
.loc-group-header .select-all:hover { text-decoration: underline; }
.loc-row {
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  font-size: 16px;
  color: var(--charcoal);
  cursor: pointer;
  border-bottom: 1px solid #F5F2F0;
  background: var(--white);
  transition: background-color 0.1s;
}
.loc-row:hover { background: var(--cream); }
.loc-row .check {
  width: 20px; height: 20px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s, border-color 0.15s;
}
.loc-row.selected .check {
  background: var(--green); border-color: var(--green);
}
.loc-row.selected .check::after {
  content: '✓'; color: var(--white); font-weight: 700; font-size: 13px;
}
.loc-empty {
  text-align: center; padding: 24px;
  font-size: 15px; color: var(--gray);
}

/* ===== Calendar ===== */
.calendar {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  background: var(--white);
  max-width: 360px;
}
.cal-quick {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
}
.cal-quick .pill {
  font-size: 13px; padding: 4px 12px; min-height: 28px;
}
.cal-month-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.cal-month-title {
  font-family: 'Bitter', serif; font-weight: 700; font-size: 20px;
  color: var(--espresso); flex: 1; text-align: center;
}
.cal-nav {
  width: 32px; height: 32px;
  background: transparent; border: none;
  color: var(--terracotta); font-size: 18px;
  border-radius: 6px; cursor: pointer;
  font-family: 'Lato', sans-serif;
}
.cal-nav:hover { background: var(--cream); }
.cal-nav:disabled { color: var(--silver); cursor: not-allowed; }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 12px; font-weight: 700;
  color: var(--gray);
  text-transform: uppercase; letter-spacing: 0.5px;
  text-align: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1 / 1;
  min-width: 40px; min-height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 15px; font-weight: 500;
  color: var(--charcoal);
  cursor: pointer;
  background: var(--white);
  border: none;
  font-family: 'Lato', sans-serif;
  transition: background-color 0.15s, color 0.15s;
}
.cal-day:hover { background: var(--cream); }
.cal-day.selected {
  background: var(--terracotta); color: var(--white); font-weight: 700;
}
.cal-day.today {
  border: 1.5px solid var(--terracotta); color: var(--terracotta);
}
.cal-day.today.selected { color: var(--white); }
.cal-day.past, .cal-day.out-of-month {
  color: var(--silver); cursor: not-allowed;
  font-weight: 400;
}
.cal-day.past:hover, .cal-day.out-of-month:hover { background: var(--white); }
.cal-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.cal-footer .count {
  font-weight: 700; font-size: 14px; color: var(--espresso);
}
.cal-footer .clear {
  color: var(--gray); font-weight: 500; font-size: 14px;
  cursor: pointer;
  background: none; border: none;
  font-family: 'Lato', sans-serif;
}
.cal-footer .clear:hover { color: var(--terracotta); }

/* ===== Order summary ===== */
.summary {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  max-width: 360px;
}
.summary-header {
  font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--espresso);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.summary .line {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}
.summary .line .label { font-weight: 500; color: var(--gray); }
.summary .line .value { font-weight: 700; color: var(--espresso); }
.summary .math {
  font-size: 13px; font-style: italic; color: var(--gray);
  margin: 12px 0 8px;
}
.summary .total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 16px; margin-top: 8px;
  border-top: 1px solid var(--border);
}
.summary .total .label {
  font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--espresso);
}
.summary .total .amount {
  font-family: 'Bitter', serif; font-weight: 700; font-size: 24px;
  color: var(--espresso);
}
.summary .empty-state {
  font-size: 14px; color: var(--silver); font-style: italic;
  text-align: center; padding: 8px 0;
}
.summary .btn { width: 100%; margin-top: 18px; }

/* ===== Confirmation block ===== */
.confirmation {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}
.confirmation .icon-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--green-bg);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  color: var(--green);
  font-size: 32px; font-weight: 700;
}
.confirmation h1 {
  font-family: 'Bitter', serif; font-weight: 700;
  font-size: 28px; color: var(--espresso);
  margin: 0 0 12px;
}
.confirmation p.body {
  font-size: 17px; color: var(--charcoal); line-height: 1.7;
  max-width: 560px; margin: 0 auto;
}
.next-steps {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 28px 24px;
  margin: 32px auto;
  max-width: 560px;
  text-align: left;
}
.next-steps h3 {
  font-family: 'Lato', sans-serif; font-weight: 700; font-size: 22px;
  color: var(--espresso);
  margin-bottom: 16px;
}
.next-steps ul { list-style: none; }
.next-steps li {
  padding: 8px 0 8px 28px;
  font-size: 15px; color: var(--charcoal); line-height: 1.6;
  position: relative;
}
.next-steps li::before {
  content: '✓'; color: var(--green); font-weight: 700;
  position: absolute; left: 0; top: 8px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
