/* Pacisoft 2026 — bao-gia.html page styles (page-local; tokens.css + base.css load first). */

/* the page toggles states with [hidden]; display:grid/flex below must not win */
[hidden] { display: none !important; }

.quote-page { padding-block: var(--space-8) var(--space-12); }
@media (min-width: 768px) { .quote-page { padding-block: var(--space-12) var(--space-16); } }

/* ------------------------------------------------------------ breadcrumb */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2);
  font-size: var(--text-xs); color: var(--ink-soft); margin-bottom: var(--space-6);
}
.breadcrumb a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-ink); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------- page head */
.quote-head { max-width: 62ch; margin-bottom: var(--space-8); }
.quote-head h1 { margin-bottom: var(--space-3); }

/* ------------------------------------------------------------ empty state */
.quote-empty {
  display: grid; justify-items: center; text-align: center; gap: var(--space-3);
  max-width: 52ch; margin-inline: auto;
  padding: var(--space-12) var(--space-6);
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.quote-empty-icon { color: var(--line); }
.quote-empty h2 { font-size: var(--text-xl); }
.quote-empty-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3);
  margin-top: var(--space-3);
}

/* ---------------------------------------------------------------- layout */
.quote-layout { display: grid; gap: var(--space-8); align-items: start; }
@media (min-width: 1024px) {
  .quote-layout { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: var(--space-12); }
  .quote-form-wrap { position: sticky; top: calc(64px + var(--space-6)); }
}

.quote-items-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--space-2); margin-bottom: var(--space-4);
}
.quote-items-head h2 { font-size: var(--text-lg); }
/* per-type groups: software (seats + term) vs hardware (qty + support level) */
.quote-group + .quote-group { margin-top: var(--space-8); }
.quote-group-title {
  margin-bottom: var(--space-3);
  font-size: var(--text-xs); font-family: var(--font-display); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
}
.quote-items-foot { margin-top: var(--space-4); }
.quote-items-foot a {
  display: inline-flex; align-items: center; min-height: 40px;
  font-weight: 600; text-decoration: none;
}
.quote-items-foot a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ item table */
.quote-table {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.quote-table thead th {
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-display); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; text-align: left;
  color: var(--ink-soft); background: var(--paper);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.quote-table tbody td {
  padding: var(--space-4);
  vertical-align: middle;
  border-top: 1px solid var(--line);
}
.quote-table tbody tr:first-child td { border-top: 0; }

.cell-product { min-width: 14rem; }
.cell-brand {
  display: block; font-size: var(--text-xs); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
}
.cell-name {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-sm); line-height: 1.35; letter-spacing: -.01em;
  margin-top: 2px;
}
.cell-config .select { min-width: 11.5rem; }
.cell-remove { width: 1%; text-align: right; }

/* stepper — every hit area ≥ 40px */
.stepper {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); overflow: hidden;
}
.stepper-btn {
  width: 40px; min-height: 44px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; line-height: 1;
  color: var(--accent-ink); cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.stepper-btn:hover { background: var(--accent-soft); }
.stepper-btn:disabled { color: #A9B6C7; cursor: not-allowed; background: transparent; }
.stepper-input {
  width: 3.25rem; min-height: 44px;
  padding: 0 var(--space-1);
  font-size: var(--text-sm); font-weight: 600; text-align: center;
  background: var(--white); border: 0;
  border-inline: 1px solid var(--line);
}
.stepper-input:focus { outline-offset: -3px; }

.remove-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-width: 40px; min-height: 40px; padding: 0 var(--space-3);
  font-size: var(--text-xs); font-weight: 600;
  color: var(--ink-soft); background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.remove-btn:hover { color: #B42318; border-color: #F3B0AA; background: #FEF3F2; }
.remove-btn .remove-text { display: none; }
@media (min-width: 480px) { .remove-btn .remove-text { display: inline; } }

/* stacked card rows on narrow screens */
@media (max-width: 899px) {
  .quote-table, .quote-table thead, .quote-table tbody,
  .quote-table tr, .quote-table td { display: block; width: 100%; }
  .quote-table { border: 0; background: none; box-shadow: none; border-radius: 0; }
  .quote-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .quote-row {
    position: relative;
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    padding: var(--space-4);
  }
  .quote-row + .quote-row { margin-top: var(--space-3); }
  .quote-table tbody td { border-top: 0; padding: 0; }
  .quote-table tbody td + td { margin-top: var(--space-3); }
  .cell-config, .cell-qty {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  }
  .cell-config::before, .cell-qty::before {
    content: attr(data-label);
    font-size: var(--text-xs); font-weight: 600; color: var(--ink-soft);
  }
  .cell-product { padding-right: 3rem; }
  .cell-remove { position: absolute; top: var(--space-3); right: var(--space-3); width: auto; }
  .remove-btn .remove-text { display: none; }
}

/* ----------------------------------------------------------------- form */
.quote-form-card { padding: var(--space-6); gap: 0; }
.quote-form-card:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }
.quote-form-card h2 { font-size: var(--text-lg); }
.quote-form { margin-top: var(--space-6); }
.quote-form > * + * { margin-top: var(--space-4); }
.req { color: #B42318; }

.field-hint { margin-top: var(--space-1); }
.field-error {
  margin-top: var(--space-2);
  font-size: var(--text-xs); font-weight: 500; color: #B42318;
}
.input.is-invalid, .textarea.is-invalid { border-color: #E4756B; }
.input.is-invalid:focus, .textarea.is-invalid:focus { box-shadow: 0 0 0 3px #FEE4E2; }

.form-error-summary {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm); color: #912018;
  background: #FEF3F2; border: 1px solid #F3B0AA; border-radius: var(--radius);
}
.quote-form-note { margin-top: var(--space-3); text-align: center; }

/* reassurance row — service promises, never commercial terms */
.quote-assure {
  list-style: none; margin: 0; padding: var(--space-4) 0 0;
  display: grid; gap: var(--space-2);
  border-top: 1px solid var(--line);
}
.quote-assure li {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); color: var(--ink-soft);
}
.quote-assure svg { flex: none; color: var(--ok); }

/* --------------------------------------------------------- confirmation */
.quote-done { outline: none; }
.quote-done-card {
  max-width: 60ch; margin-inline: auto;
  padding: var(--space-8) var(--space-6);
  text-align: center;
  animation: quote-done-in .32s var(--ease) both;
}
.quote-done-card:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }
/* DIRECTION §1: --signal / --signal-soft exist for exactly one moment on this
   site — the "Đã gửi yêu cầu" panel and its quote reference. --signal on
   --signal-soft measures 3.4:1, so it carries only the icon, the border and the
   large reference code; every piece of body copy in the panel stays --ink /
   --ink-soft (5.8:1+). --ok keeps its job on the inline form-validation ticks. */
.quote-done-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin-inline: auto;
  color: var(--white); background: var(--signal); border-radius: 999px;
}
.quote-done-card h2 { font-size: var(--text-xl); }
.quote-done-subtitle {
  margin-top: var(--space-8); padding-top: var(--space-6);
  font-size: var(--text-xs); font-family: var(--font-display); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  border-top: 1px solid var(--line); text-align: left;
}
.quote-done-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.quote-done-item {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-3);
  font-size: var(--text-sm);
}
.quote-done-item + .quote-done-item { border-top: 1px dashed var(--line); }
.done-brand { color: var(--ink-soft); font-size: var(--text-xs); }
.done-meta { color: var(--ink-soft); font-size: var(--text-xs); white-space: nowrap; }
.quote-done-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3);
  margin-top: var(--space-6);
}

@keyframes quote-done-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* quote reference — the one thing to quote back when they call */
.quote-ref {
  display: grid; justify-items: center; gap: var(--space-1);
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--signal-soft);
  border: 1px solid color-mix(in srgb, var(--signal) 34%, var(--signal-soft));
  border-radius: var(--radius-lg);
}
.quote-ref-label {
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
}
.quote-ref-code {
  font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800;
  letter-spacing: -.01em; color: var(--signal); line-height: 1.1;
}
.quote-ref-note { font-size: var(--text-xs); color: var(--ink-soft); }
@media (max-width: 479px) {
  .quote-ref { padding-inline: var(--space-3); }
  .quote-ref-code { font-size: var(--text-xl); white-space: nowrap; }
}
.quote-print-note { margin-top: var(--space-3); }

/* ------------------------------------------------- print-only RFQ sheet */
.rfq-print { display: none; }

@media print {
  /* hide every bit of site chrome — this sheet is the deliverable */
  .site-header, .site-footer, .watermark-badge, .skip-link,
  .breadcrumb, .quote-head,
  .quote-done-icon, .quote-done-actions, .quote-print-note,
  .quote-done-subtitle, .quote-done-list, .quote-ref,
  .btn, button { display: none !important; }

  html, body { background: var(--white); color: #000; }
  .quote-page { padding: 0; }
  .quote-done, .quote-done-card {
    display: block; max-width: none; margin: 0; padding: 0;
    text-align: left; background: none; border: 0; box-shadow: none; animation: none;
  }
  .quote-done-card h2, .quote-done-card > p { display: none !important; }

  .rfq-print { display: block; font-size: 11pt; color: #000; }
  .rfq-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16pt;
    padding-bottom: 8pt; border-bottom: 2pt solid #000; margin-bottom: 14pt;
  }
  .rfq-wordmark {
    font-family: var(--font-display); font-weight: 800; font-size: 20pt;
    letter-spacing: -.02em; margin: 0;
  }
  .rfq-meta { text-align: right; }
  .rfq-meta p { margin: 0 0 2pt; font-size: 10pt; }
  .rfq-doctype { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
  .rfq-section {
    font-size: 10pt; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    margin: 14pt 0 6pt;
  }
  .rfq-contact, .rfq-items { width: 100%; border-collapse: collapse; }
  .rfq-contact th, .rfq-contact td,
  .rfq-items th, .rfq-items td {
    padding: 4pt 6pt; text-align: left; vertical-align: top;
    border: .5pt solid #999; font-size: 10pt;
  }
  .rfq-contact th { width: 28%; font-weight: 600; background: #F2F2F2; }
  .rfq-items thead th { font-weight: 700; background: #F2F2F2; }
  .rfq-items tr { break-inside: avoid; page-break-inside: avoid; }
  .rfq-brand { font-weight: 400; }
  .rfq-foot { margin-top: 14pt; font-size: 8.5pt; color: #444; }

  @page { size: A4; margin: 14mm; }
}
