/* ==========================================================================
   LCS Cut Pro ONLINE — Chase Cover Order Forms
   Styled to match lifetimechimneysupply.com
   ========================================================================== */

:root {
  --lcs-red: #dc0000;
  --lcs-black: #000;
  --lcs-dark: #262626;
  --lcs-gray: #78787b;
  --lcs-light-gray: #d7d7da;
  --lcs-yellow: #ffff00;
  --lcs-blue: #0070f3;
  --font-cond: "Oswald", "Franklin Gothic Medium Cond", "Arial Narrow", sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Header — black gradient bar with logo + phone, like the live site
   -------------------------------------------------------------------------- */
#main-header {
  padding: 25px 0;
  background: linear-gradient(to bottom, #262626 0%, #000000 100%);
}

#main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

#main-header .logo img {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
}

#main-header .contact {
  text-align: right;
  color: #fff;
}

#main-header .contact .phone {
  font-family: var(--font-cond);
  font-size: 20px;
  margin: 0 0 4px;
}

#main-header .contact a {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

#main-header .contact a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Nav strip — light gray with condensed uppercase links
   -------------------------------------------------------------------------- */
#main-nav {
  background-color: var(--lcs-light-gray);
  margin-bottom: 25px;
}

#main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 12px 0;
}

#main-nav a {
  font-family: var(--font-cond);
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  display: block;
}

#main-nav a:hover,
#main-nav li.active a {
  color: #fff;
  background-color: #000;
}

/* --------------------------------------------------------------------------
   Page headings
   -------------------------------------------------------------------------- */
h1.ruled {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: 34px;
  margin: 0 0 5px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.lead { font-size: 17px; color: var(--lcs-red); }
.note { color: var(--lcs-gray); font-size: 14px; }

/* --------------------------------------------------------------------------
   Worksheet sections — yellow bars like the paper forms
   -------------------------------------------------------------------------- */
section.sheet-section {
  margin: 30px 0;
}

.section-bar {
  background-color: var(--lcs-yellow);
  border: 2px solid #000;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1px;
  padding: 4px 10px;
  margin: 0 0 18px;
}

/* --------------------------------------------------------------------------
   Form layout
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 40px;
  align-items: start;
}

.form-grid .diagram-cell { grid-row: span 6; }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .diagram-cell { grid-row: auto; }
}

.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.field-row label.dim-label {
  font-weight: bold;
  font-size: 15px;
  min-width: 130px;
}

.dim-label .sym { font-weight: bold; }
.sym-red { color: var(--lcs-red); }
.sym-blue { color: var(--lcs-blue); }

input.dim {
  width: 110px;
  padding: 8px;
  font-size: 15px;
  border: 1px solid rgb(200, 200, 205);
  border-radius: 2px;
}

input.dim:focus {
  border-color: #000;
  background-color: #eaf4fb;
  outline: none;
}

input.dim:disabled {
  background-color: #f0f0f2;
  color: #aaa;
}

input.dim.invalid {
  border-color: var(--lcs-red);
  background-color: #fdeaea;
}

input.text-wide,
textarea.text-wide,
input.date-input {
  width: 100%;
  max-width: 320px;
  padding: 8px;
  font-size: 15px;
  border: 1px solid rgb(200, 200, 205);
  border-radius: 2px;
  font-family: inherit;
}

textarea.text-wide { resize: vertical; }
input.date-input { max-width: 200px; }

input.text-wide:focus,
textarea.text-wide:focus,
input.date-input:focus {
  border-color: #000;
  background-color: #eaf4fb;
  outline: none;
}

input.text-wide.invalid,
textarea.text-wide.invalid,
input.date-input.invalid {
  border-color: var(--lcs-red);
  background-color: #fdeaea;
}

/* Delivery address grays out when "Pickup" is chosen. Use an explicit gray
   fill (not opacity) so it's clearly disabled against the white page. */
.address-row.addr-disabled label { color: #aaa; }
.address-row.addr-disabled textarea {
  pointer-events: none;
  background-color: #f0f0f2;
  color: #aaa;
  border-color: #e0e0e3;
}

.unit-hint { color: var(--lcs-gray); font-size: 13px; }

/* Radio / checkbox option groups */
.opt-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.opt-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  cursor: pointer;
}

.opt-group input[type="radio"],
.opt-group input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--lcs-red);
  cursor: pointer;
}

/* Choose-one rows: radio + inline input */
.choose-block {
  margin: 18px 0;
}

.choose-block > .choose-title {
  font-weight: bold;
  font-size: 14px;
  text-decoration: underline;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.choose-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 6px 4px;
}

.choose-option .or {
  color: var(--lcs-gray);
  font-style: italic;
  margin-right: 4px;
  width: 18px;
  display: inline-block;
}

/* Fixed (non-choice) location rows, e.g. "LEFT EDGE (LE)" only */
.choose-block-static {
  margin: 18px 0;
}

.choose-block-static > .choose-title {
  font-weight: bold;
  font-size: 14px;
  text-decoration: underline;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.fixed-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 6px 4px;
}

/* --------------------------------------------------------------------------
   Diagrams
   -------------------------------------------------------------------------- */
.diagram {
  background-color: #fff;
  border: 10px solid #f5f5f5;
  padding: 10px;
  margin-bottom: 10px;
}

.diagram svg { display: block; width: 100%; height: auto; }

.diagram-caption {
  text-align: center;
  font-size: 13px;
  color: var(--lcs-gray);
  margin: -4px 0 12px;
}

/* "No hole" checked: hole is cut later on site, so only the LOCATION
   fields gray out — diameter and collar stay active. */
.choose-block.loc-disabled,
.choose-block-static.loc-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Submit + results
   -------------------------------------------------------------------------- */
button.submit-btn {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 30px auto;
  padding: 18px;
  background-color: var(--lcs-red);
  border: 1px solid var(--lcs-red);
  border-radius: 2px;
  color: #fff;
  font-family: var(--font-cond);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

button.submit-btn:hover {
  background-color: #000;
  border-color: #000;
}

#form-result {
  display: none;
  max-width: 760px;
  margin: 20px auto;
  padding: 16px 20px;
  border-radius: 4px;
  font-size: 15px;
}

#form-result.success {
  display: block;
  background-color: #e8f6e8;
  border: 1px solid #2e7d32;
  color: #1b5e20;
}

#form-result.error {
  display: block;
  background-color: #fdeaea;
  border: 1px solid var(--lcs-red);
  color: #8d0000;
}

#form-result pre {
  background: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  overflow-x: auto;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Preview area (Preview Order → review → Submit to Lifetime)
   -------------------------------------------------------------------------- */
#preview-area { margin: 20px 0; }

.preview-pending,
.preview-stale,
.preview-ready {
  padding: 16px 20px;
  border-radius: 4px;
}

.preview-pending {
  background: #eef5fb;
  border: 1px solid #b9d6ee;
  color: #1a4d73;
}

.preview-stale {
  background: #fff8e1;
  border: 1px solid #e6c860;
  color: #7a5c00;
}

.preview-ready {
  background: #f7f7f8;
  border: 1px solid #ddd;
}

.preview-ready h3 {
  font-family: var(--font-cond);
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 12px;
}

.preview-note { margin: 0; }

.preview-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 12px;
  border: 1px solid #ccc;
  background: #fff;
}

.preview-price { text-align: center; font-size: 18px; margin: 6px 0; }
.preview-help { text-align: center; color: var(--lcs-gray); margin: 6px 0 4px; }

.submit-lifetime { margin-top: 14px; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border: 3px solid #b9d6ee;
  border-top-color: #1a4d73;
  border-radius: 50%;
  animation: lcs-spin 0.8s linear infinite;
  vertical-align: -4px;
}

@keyframes lcs-spin { to { transform: rotate(360deg); } }

/* Confirmation card after Submit to Lifetime */
#confirmation:empty { display: none; }
#confirmation.success {
  background: #e8f6e8;
  border: 1px solid #2e7d32;
  color: #1b5e20;
  padding: 24px;
  border-radius: 6px;
  margin: 20px 0 40px;
  text-align: center;
}
#confirmation.success h2 {
  font-family: var(--font-cond);
  margin: 0 0 12px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
#main-footer {
  margin-top: 50px;
  padding: 20px 0;
  background-color: var(--lcs-light-gray);
}

#main-footer .menu {
  text-align: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

#main-footer .menu li { display: inline-block; margin: 0 12px; }
#main-footer .menu a { color: #000; text-decoration: none; }
#main-footer .menu a:hover { color: var(--lcs-red); }

#copyright {
  text-align: center;
  color: var(--lcs-gray);
  font-size: 13px;
  padding: 15px 0 25px;
}

/* --------------------------------------------------------------------------
   Landing page (matches the live site homepage)
   -------------------------------------------------------------------------- */
body.landing {
  background: #000;
  color: #fff;
}

.landing-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.landing-wrap .logo { margin-bottom: 30px; }
.landing-wrap .logo img { max-width: 460px; width: 100%; }

.landing-wrap h1 {
  font-family: var(--font-cond);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 26px;
  margin: 0 0 40px;
}

.widgets {
  display: flex;
  justify-content: center;
  gap: 30px;
  width: 100%;
  flex-wrap: wrap;
}

.widgets .widget {
  font-family: var(--font-cond);
  font-size: 1.3rem;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  background-color: #1e1e2d;
  border: 1px solid #646473;
  border-radius: 8px;
  aspect-ratio: 2 / 1;
  width: 28%;
  min-width: 220px;
  padding: 20px;
  line-height: 1.4;
  transition: background-color 0.22s ease-out;
}

.widgets .widget:hover {
  background-color: #fff;
  color: var(--lcs-red);
}

.landing-wrap #copyright { color: var(--lcs-gray); margin-top: 60px; }
