/* CutWorks Page Specific Styles */

.page {
  max-width: 1100px;
  padding: 32px 24px 64px;
}

.breadcrumb {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--colour-text-muted);
  margin-bottom: 16px;
}

.breadcrumb:hover {
  color: var(--colour-accent-strong);
}

/* ============================================================================
   Hero
   ========================================================================= */
.page-hero {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-bottom: -120px;
  position: relative;
  min-height: 34vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(30, 35, 32, 0.94) 0%, rgba(30, 35, 32, 0.88) 55%, rgba(52, 58, 54, 0.82) 100%);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(179, 106, 60, 0.25), transparent 60%);
  pointer-events: none;
}

.page-hero-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 40px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.page-hero-text h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.1;
  color: #ffffff;
  font-weight: 600;
}

.page-hero-text p {
  margin: 0;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 620px;
  line-height: 1.7;
}

/* ============================================================================
   Form Card
   ========================================================================= */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.1);
  padding: 40px 36px 36px;
  border: 1px solid rgba(154, 165, 142, 0.2);
  position: relative;
  z-index: 2;
}

.card h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.card .lead {
  margin-bottom: 24px;
}

select {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(47, 52, 50, 0.3);
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  transition: all var(--transition-fast);
}

select:focus {
  outline: none;
  border-color: var(--colour-accent);
  box-shadow: 0 0 0 3px rgba(179, 106, 60, 0.15);
}

select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.form-section {
  margin-bottom: 20px;
}

.form-section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--colour-text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 14px;
}

legend {
  font-size: 13px;
  margin-bottom: 8px;
  padding: 0;
  font-weight: 500;
}

/* Parts table */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.parts-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(47, 52, 50, 0.15);
}

.parts-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.parts-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--colour-text-muted);
  font-weight: 600;
  padding: 12px 10px;
  background: rgba(154, 165, 142, 0.12);
  white-space: nowrap;
}

.parts-table td {
  padding: 10px;
  border-top: 1px solid rgba(47, 52, 50, 0.1);
  vertical-align: middle;
}

.parts-table select,
.parts-table input {
  padding: 9px 10px;
  font-size: 14px;
}

.parts-table .part-quantity {
  width: 100%;
  min-width: 64px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(47, 52, 50, 0.3);
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
}

.parts-table-action-col {
  width: 44px;
}

.remove-part-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(47, 52, 50, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: var(--colour-text-muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.remove-part-btn:hover {
  border-color: #b23a2e;
  color: #b23a2e;
}

.add-part-btn {
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px dashed rgba(179, 106, 60, 0.5);
  background: rgba(179, 106, 60, 0.08);
  color: var(--colour-accent-strong);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.add-part-btn:hover {
  background: rgba(179, 106, 60, 0.15);
  border-color: var(--colour-accent);
}

/* File upload */
.file-upload {
  display: block;
  border: 1px dashed rgba(47, 52, 50, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  background: rgba(154, 165, 142, 0.08);
  font-size: 13px;
  color: var(--colour-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-upload:hover {
  border-color: var(--colour-accent);
  background: rgba(154, 165, 142, 0.15);
}

.file-upload input {
  display: block;
  width: 100%;
  font-size: 13px;
  font-family: inherit;
  color: var(--colour-text-main);
}

.file-name {
  margin-top: 6px;
  font-size: 12px;
  color: var(--colour-accent-strong);
}

/* ============================================================================
   Estimate Panel
   ========================================================================= */
.two-column {
  align-items: start;
}

.estimate-panel {
  background: rgba(154, 165, 142, 0.1);
  border: 1px solid rgba(154, 165, 142, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px 22px 22px;
  position: sticky;
  top: 20px;
}

.estimate-badge {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(179, 106, 60, 0.15);
  color: var(--colour-accent-strong);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.estimate-placeholder {
  font-size: 13px;
  color: var(--colour-text-muted);
  font-style: italic;
  line-height: 1.6;
  padding: 8px 0 4px;
}

.estimate-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(47, 52, 50, 0.15);
}

.estimate-line .estimate-label {
  color: var(--colour-text-muted);
  font-weight: 500;
}

.estimate-line .estimate-value {
  text-align: right;
  font-weight: 600;
}

.estimate-line.muted-value .estimate-value {
  font-weight: 500;
  color: var(--colour-text-muted);
  font-size: 13px;
}

.estimate-min-note {
  margin: 12px 0;
  font-size: 12px;
  color: var(--colour-text-muted);
  border-left: 2px solid var(--colour-accent);
  padding-left: 10px;
  line-height: 1.6;
}

.parts-help {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(154, 165, 142, 0.12);
  border: 1px solid rgba(154, 165, 142, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.parts-help p {
  margin: 0;
  font-size: 13px;
  color: var(--colour-text-muted);
}

.parts-help .btn-secondary {
  padding: 8px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.submit-error {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(178, 58, 46, 0.1);
  border-left: 2px solid #b23a2e;
  color: #8a2c22;
  font-size: 13px;
  line-height: 1.6;
}

.submit-error a {
  color: inherit;
  text-decoration: underline;
}

.estimate-total {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px solid rgba(179, 106, 60, 0.3);
}

.estimate-total-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--colour-text-muted);
  margin-bottom: 4px;
}

.estimate-total-value {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--colour-accent-strong);
}

.estimate-gst-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--colour-text-muted);
}

/* ============================================================================
   Success Message
   ========================================================================= */
.success-message {
  text-align: center;
  padding: 40px 10px 20px;
}

.success-message h2 {
  margin-bottom: 10px;
}

.success-message p {
  color: var(--colour-text-muted);
  max-width: 480px;
  margin: 0 auto;
}

.small-print {
  margin-top: 16px;
  font-size: 11px;
  color: var(--colour-text-muted);
}

/* ============================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .page-hero {
    min-height: auto;
    padding: 60px 0;
    margin-bottom: -80px;
  }

  .page-hero-container {
    padding: 40px 24px;
  }

  .page-hero-text h1 {
    font-size: clamp(30px, 8vw, 44px);
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .estimate-panel {
    position: static;
  }

  .card {
    padding: 32px 24px 28px;
  }
}
