/* =========================================================
   VALMETO / rfq.css
   Clean RFQ Layout
========================================================= */

.page-rfq-pro,
.page-rfq-success {
  min-height: 100vh;
  padding-top: var(--header-height-desktop);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(211, 155, 91, 0.13), transparent 28%),
    linear-gradient(90deg, #07172d 0%, #0a2344 52%, #07172d 100%);
  color: var(--color-navy);
}

.rfq-pro-container {
  width: min(calc(100% - 7rem), 1480px);
  max-width: 1480px;
  margin: 0 auto;
  padding: 1.4rem 0 3rem;
}

.rfq-layout {
  width: 100%;
  display: block;
  min-width: 0;
}

.rfq-main {
  width: 100%;
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.rfq-pro-section,
.rfq-pro-section--wide {
  min-width: 0;
}

.excel-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

/* =========================================================
   PAGE HEAD
========================================================= */

.rfq-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--color-light);
}

.rfq-page-eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-gold-light);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rfq-page-head h1 {
  margin: 0;
  color: var(--color-light);
  font-size: clamp(1.7rem, 2.8vw, 2.45rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.rfq-page-head p {
  max-width: 680px;
  margin: 0.35rem 0 0;
  color: rgba(247, 245, 242, 0.78);
  font-size: 0.95rem;
  line-height: 1.45;
}

.rfq-page-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(211, 155, 91, 0.36);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-light);
  white-space: nowrap;
}

.rfq-page-status span {
  color: rgba(247, 245, 242, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
}

.rfq-page-status strong {
  color: var(--color-gold-light);
  font-size: 0.78rem;
  font-weight: 900;
}

/* =========================================================
   SECTIONS
========================================================= */

.rfq-pro-section {
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(8, 23, 44, 0.08);
  background: #ffffff;
  color: var(--color-navy);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}

.rfq-pro-section--wide {
  padding-bottom: 1.15rem;
}

.rfq-pro-section h2 {
  display: inline-flex;
  margin: 0 0 0.85rem;
  padding-bottom: 0.42rem;
  border-bottom: 1px solid rgba(211, 155, 91, 0.70);
  color: var(--color-navy);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* =========================================================
   FORM FIELDS
========================================================= */

.rfq-pro-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.rfq-pro-row:last-child {
  margin-bottom: 0;
}

.rfq-pro-row.three .rfq-pro-field {
  min-width: 150px;
}

.rfq-pro-field {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.rfq-pro-field.full {
  flex: 1 1 100%;
}

.rfq-pro-field label {
  display: block;
  color: #536174;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.required {
  color: #c62828;
}

.rfq-pro-field input,
.rfq-pro-field select,
.rfq-pro-field textarea {
  width: 100%;
  min-height: 36px;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(8, 23, 44, 0.13);
  border-radius: 9px;
  background: #fafbfd;
  color: var(--color-navy);
  font-family: var(--font-main);
  font-size: 0.88rem;
  line-height: 1.35;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(8, 23, 44, 0.025);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.rfq-pro-field textarea {
  min-height: 64px;
  resize: vertical;
}

.rfq-pro-field input:focus,
.rfq-pro-field select:focus,
.rfq-pro-field textarea:focus,
.rfq-pro-table input:focus,
.rfq-pro-table select:focus {
  outline: none;
  border-color: var(--color-gold);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(211, 155, 91, 0.13);
}

.rfq-pro-field input::placeholder,
.rfq-pro-field textarea::placeholder {
  color: rgba(8, 23, 44, 0.34);
}

.rfq-pro-field small {
  color: var(--color-text-muted-on-white);
  font-size: 0.72rem;
  line-height: 1.35;
}

.rfq-pro-field select,
.rfq-pro-table select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536174' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 0.86rem;
}

/* =========================================================
   PRODUCT TABLE
========================================================= */

.excel-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(8, 23, 44, 0.08);
  background: #ffffff;
}

.rfq-pro-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.8rem;
}

.rfq-pro-table th,
.rfq-pro-table td {
  padding: 0.4rem 0.48rem;
  border-bottom: 1px solid rgba(8, 23, 44, 0.07);
  text-align: left;
  vertical-align: middle;
}

.rfq-pro-table th {
  background: #f1f4f8;
  color: var(--color-navy);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rfq-pro-table td {
  background: #ffffff;
}

.rfq-pro-table tbody tr:hover td {
  background: rgba(211, 155, 91, 0.035);
}

.rfq-pro-table input,
.rfq-pro-table select {
  width: 100%;
  min-height: 34px;
  padding: 0.32rem 0.5rem;
  border: 1px solid rgba(8, 23, 44, 0.12);
  border-radius: 8px;
  background-color: #fafbfd;
  color: var(--color-navy);
  font-family: var(--font-main);
  font-size: 0.8rem;
  box-sizing: border-box;
}

/* Column widths */
.rfq-pro-table th:nth-child(1),
.rfq-pro-table td:nth-child(1) {
  width: 36px;
  text-align: center;
}

.rfq-pro-table th:nth-child(2),
.rfq-pro-table td:nth-child(2) {
  width: 115px;
}

.rfq-pro-table th:nth-child(3),
.rfq-pro-table td:nth-child(3) {
  width: 100px;
}

.rfq-pro-table th:nth-child(4),
.rfq-pro-table td:nth-child(4) {
  width: 130px;
}

.rfq-pro-table th:nth-child(5),
.rfq-pro-table td:nth-child(5) {
  width: 250px;
}

rfq-alloy-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rfq-alloy-cell select {
  width: 100%;
}
.rfq-pro-table th:nth-child(6),
.rfq-pro-table td:nth-child(6) {
  width: 180px;
}

.rfq-pro-table th:nth-child(7),
.rfq-pro-table td:nth-child(7) {
  width: 100px;
}

.rfq-pro-table th:nth-child(8),
.rfq-pro-table td:nth-child(8) {
  width: 100px;
}

.rfq-pro-table th:nth-child(9),
.rfq-pro-table td:nth-child(9) {
  width: 100px;
}

.rfq-pro-table th:nth-child(10),
.rfq-pro-table td:nth-child(10) {
  width: 88px;
}

.rfq-pro-table th:nth-child(11),
.rfq-pro-table td:nth-child(11) {
  width: 50px;
}

.rfq-pro-table th:nth-child(12),
.rfq-pro-table td:nth-child(12) {
  width: 120px;
}

.rfq-pro-table th:nth-child(13),
.rfq-pro-table td:nth-child(13) {
  width: 80px;
}

.rfq-pro-table th:nth-child(14),
.rfq-pro-table td:nth-child(14) {
  width: 44px;
  text-align: center;
}

.rfq-pro-table input[data-field="quantity"] {
  min-width: 70px;
  text-align: right;
}

.rfq-pro-table select[data-field="unit"] {
  min-width: 68px;
}

.rfq-pro-net-kg {
  text-align: right;
  font-weight: 800;
  background: #f0f4f8;
}

.rfq-pro-remove-row {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(198, 40, 40, 0.3);
  border-radius: 999px;
  background: rgba(198, 40, 40, 0.06);
  color: #c62828;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.rfq-pro-remove-row:hover {
  background: rgba(198, 40, 40, 0.15);
}

/* =========================================================
   EMPTY TABLE / ADD ROW
========================================================= */

.excel-preview-empty {
  margin-bottom: 0.6rem;
  padding: 1.15rem 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(8, 23, 44, 0.14);
  background: #f7f8fb;
  color: var(--color-text-muted-on-white);
  text-align: center;
  font-size: 0.88rem;
}

.excel-preview-empty a {
  color: var(--color-gold-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-add-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  border: 1px dashed rgba(211, 155, 91, 0.55);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-gold-dark);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.btn-add-row:hover {
  background: rgba(211, 155, 91, 0.10);
  color: var(--color-navy);
}

/* =========================================================
   CHECKBOXES
========================================================= */

.rfq-checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.35rem 0.65rem;
}

.rfq-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--color-navy);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.rfq-checkbox-group input[type="checkbox"] {
  width: 15px;
  min-height: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--color-gold-dark);
}

/* =========================================================
   ACTIONS
========================================================= */

.rfq-pro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-start;
  padding: 0.85rem 0 0.25rem;
}

.rfq-pro-actions .btn {
  min-height: 38px;
  padding: 0.52rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

.rfq-pro-actions .btn--primary {
  border: 1px solid rgba(211, 155, 91, 0.70);
  background: var(--gradient-gold);
  color: var(--color-navy);
  box-shadow: 0 8px 18px rgba(211, 155, 91, 0.22);
}

.rfq-pro-actions .btn--ghost {
  border: 1px solid rgba(247, 245, 242, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-light);
}

.rfq-pro-actions .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   MESSAGES
========================================================= */

.rfq-error-message {
  display: block;
  margin-top: 0.3rem;
  color: #c62828;
  font-size: 0.78rem;
  font-weight: 800;
}

.rfq-success-message {
  display: block;
  margin-top: 0.3rem;
  color: #2e7d32;
  font-size: 0.78rem;
  font-weight: 800;
}

.rfq-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* =========================================================
   THANK YOU PAGE
========================================================= */

.rfq-success-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: var(--space-3xl) var(--space-md);
  text-align: center;
  color: var(--color-light);
}

.rfq-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(211, 155, 91, 0.40);
  background: rgba(211, 155, 91, 0.14);
  color: var(--color-gold);
  font-size: 1.8rem;
}

.rfq-success-text {
  max-width: 580px;
  margin: 0.75rem auto;
  color: rgba(247, 245, 242, 0.78);
  font-size: 1rem;
  line-height: var(--lh-body);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .page-rfq-pro,
  .page-rfq-success {
    padding-top: var(--header-height-mobile);
  }

  .rfq-pro-container {
    width: calc(100% - 1.5rem);
    max-width: 100%;
  }

  .rfq-page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .rfq-page-head h1 {
    font-size: 1.75rem;
  }

  .rfq-pro-section {
    padding: 0.9rem;
    border-radius: 14px;
  }

  .rfq-pro-row,
  .rfq-pro-row.three {
    flex-direction: column;
    gap: 0.55rem;
  }

  .rfq-pro-field {
    min-width: 0;
  }

  .rfq-pro-actions {
    flex-direction: column;
  }

  .rfq-pro-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .rfq-checkbox-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .rfq-pro-table th,
  .rfq-pro-table td {
    padding: 0.38rem 0.42rem;
    font-size: 0.72rem;
  }

  .rfq-checkbox-group {
    grid-template-columns: 1fr;
  }
}