/* =====================================================================
   Lion Power — APM Warranty Request Form
   Brand tokens mirror LionPower.App/Themes/BrandTokens.xaml.
   Keep hexes here in sync with that file when the brand refreshes.
   Layout structure is intentionally identical to the APM Order Form
   (orderform.lionpowerusa.com) so the two customer-facing surfaces
   feel like one product family.
====================================================================== */

:root {
  --ink:        #111412;
  --ink-2:      #3A3F38;
  --ink-3:      #6B7069;
  --page-bg:    #EFEFEF;
  --off-white:  #F7F8F6;
  --section-bg: #F2F4F0;
  --white:      #FFFFFF;
  --border:     #E2E5DF;
  --border-dk:  #C8CCC5;
  --yellow:     #F0A500;
  --yellow-mid: #D99500;
  --yellow-lt:  #FEF6E0;
  --yellow-acc: #F0C040;
  --green:      #4ADE80;
  --red:        #C13E2C;

  --font-sans: "Montserrat", system-ui, "Segoe UI", sans-serif;
  --font-serif: "DM Serif Display", Georgia, serif;

  --radius-btn: 6px;
  --radius-card: 12px;
  --radius-input: 6px;

  --shadow-card: 0 1px 2px rgba(17, 20, 18, 0.04), 0 4px 16px rgba(17, 20, 18, 0.04);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--page-bg);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--yellow-mid); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* ----- Header --------------------------------------------------------- */
.site-header {
  background: var(--ink);
  color: var(--white);
  border-bottom: 4px solid var(--yellow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
}
.brand:hover { text-decoration: none; color: var(--white); }
.brand-mark { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.01em;
}
.brand-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--yellow);
  font-weight: 600;
}

/* ----- Hero ----------------------------------------------------------- */
.hero {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.hero h1 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 14px;
}
.hero .lede {
  max-width: 65ch;
  font-size: 16px;
  margin: 0 0 8px;
}
.hero .lede.small { font-size: 14px; color: var(--ink-3); }

/* ----- Cards ---------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}
.card h2 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-size: 24px;
  margin: 0 0 4px;
}
.card h2 + p,
.card h2 + .muted { margin-top: 8px; }

.muted { color: var(--ink-3); font-size: 14px; }
.muted.small { font-size: 12.5px; }

/* ----- Layout grids --------------------------------------------------- */
.grid {
  display: grid;
  gap: 16px 20px;
  margin-top: 16px;
}
.grid.two   { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 720px) {
  .grid.two { grid-template-columns: 1fr; }
}

/* ----- Form fields ---------------------------------------------------- */
.field { display: flex; flex-direction: column; }
.field .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}
.field .label em {
  font-style: normal;
  color: var(--red);
  margin-left: 2px;
}
.field .help {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.field.checkbox-field {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  padding: 10px 12px;
  background: var(--yellow-lt);
  border: 1px solid var(--yellow-acc);
  border-radius: var(--radius-input);
}
.field.checkbox-field input { margin-top: 3px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border-dk);
  border-radius: var(--radius-input);
  padding: 9px 12px;
  width: 100%;
  transition: border-color 120ms, box-shadow 120ms;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.18);
}
textarea { resize: vertical; min-height: 64px; }

input[type="number"] { text-align: right; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* File input — style the native control to match the form's look. */
input[type="file"] {
  font: inherit;
  color: var(--ink);
  background: var(--off-white);
  border: 1px dashed var(--border-dk);
  border-radius: var(--radius-input);
  padding: 14px 12px;
  width: 100%;
  cursor: pointer;
}
input[type="file"]:hover { border-color: var(--yellow); background: var(--yellow-lt); }
input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 600;
  background: var(--ink);
  color: var(--white);
  border: 0;
  border-radius: var(--radius-btn);
  padding: 6px 14px;
  margin-right: 12px;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--ink-2); }

/* Inputs flagged invalid by browser/script after submission attempt */
.form-submitted input:invalid,
.form-submitted textarea:invalid,
.form-submitted select:invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(193, 62, 44, 0.12);
}

/* ----- Photo list (after selection) ---------------------------------- */
.photo-list {
  list-style: none;
  margin: 16px 0 8px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.photo-list li {
  position: relative;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.photo-list img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--section-bg);
  display: block;
}
.photo-list .photo-name {
  font-size: 11.5px;
  color: var(--ink);
  word-break: break-all;
  line-height: 1.3;
}
.photo-list .photo-size {
  font-size: 11px;
  color: var(--ink-3);
}
.photo-list .photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(17, 20, 18, 0.85);
  color: var(--white);
  border: 0;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-list .photo-remove:hover { background: var(--red); }

/* ----- Actions / footer ---------------------------------------------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.btn {
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, transform 80ms;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
}
.btn-primary:hover { background: var(--yellow-mid); border-color: var(--yellow-mid); }
.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border-dk);
}
.btn-ghost:hover { background: var(--off-white); border-color: var(--ink-3); }

.form-status {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}
.form-status.show { display: block; }
.form-status.error   { background: #FCEBE7; color: #7A2615; border: 1px solid #E5B6AC; }
.form-status.success { background: #E7F8EC; color: #1F6A33; border: 1px solid #A9DFB7; }
.form-status.info    { background: var(--yellow-lt); color: var(--ink); border: 1px solid var(--yellow-acc); }

.site-footer {
  margin-top: 48px;
  padding: 22px 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--yellow); }

/* ----- Print ---------------------------------------------------------- */
@media print {
  body { background: var(--white); }
  .site-header { background: var(--white); color: var(--ink); border-bottom-color: var(--ink); }
  .brand-name, .brand-tag { color: var(--ink) !important; }
  .actions, .site-footer, .btn { display: none !important; }
  .card { box-shadow: none; page-break-inside: avoid; }
  .reference { page-break-inside: avoid; }
  input, textarea { border: none !important; border-bottom: 1px solid var(--ink) !important; border-radius: 0 !important; background: transparent !important; }
  .photo-list img { max-height: 180px; }
}
