/* Quotation / order payment page (/my/orders/<id>) in O19 colours. Scoped to .o_portal_sale_sidebar. */
.o_portal_sale_sidebar {
  --igf-navy: #14263d;
  --igf-action: #007d84;
  --igf-teal: #20b8b3;
  --igf-ink: #1f2937;
  --igf-muted: #607084;
  --igf-line: #d6e1e5;
  --igf-panel: #f3f7f8;
  --igf-tint: #e8f8f7;
  --igf-radius: 14px;
  color: var(--igf-ink);
  padding-top: 8px;
  padding-bottom: 24px;
}
.o_portal_sale_sidebar > .vr, .o_portal_sale_sidebar .vr { display: none !important; }

/* ---------- Summary card (sidebar) ---------- */
.o_portal_sale_sidebar #sidebar_content {
  background: #fff;
  border: 1px solid var(--igf-line);
  border-radius: var(--igf-radius);
  box-shadow: 0 8px 28px rgba(20, 38, 61, .07);
  align-self: flex-start;
  padding: 22px 22px 20px !important;
}
@media (min-width: 992px) {
  .o_portal_sale_sidebar #sidebar_content { position: sticky; top: 24px; margin-right: 8px; }
}
.o_portal_sale_sidebar #sidebar_content > .position-relative { display: block !important; }
.o_portal_sale_sidebar #sidebar_content > .position-relative h2 { font-size: 38px; line-height: 1.1; font-weight: 750; letter-spacing: -.03em; color: var(--igf-navy); margin: 2px 0 0; }
.o_portal_sale_sidebar #sidebar_content > .position-relative h4 { font-size: 13px; color: var(--igf-muted); margin: 0; }
.o_portal_sale_sidebar .igf-quote-eyebrow { display: block; }
.o_portal_sale_sidebar .igf-quote-summary { margin-top: 4px; }
.igf-quote-summary { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.igf-quote-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--igf-muted);
}
.igf-quote-vat { font-size: 13px; color: var(--igf-muted); }
.igf-quote-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.igf-quote-valid { font-size: 13px; color: var(--igf-muted); }
.igf-quote-valid strong { color: var(--igf-ink); font-weight: 600; }
.igf-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 650; line-height: 1.5; border: 1px solid transparent; white-space: nowrap;
}
.igf-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.igf-pill--info { color: var(--igf-action); background: var(--igf-tint); border-color: #bfe8e6; }
.igf-pill--ok { color: #17663a; background: #e7f6ec; border-color: #bfe3cb; }
.igf-pill--warn { color: #8a5a00; background: #fff5df; border-color: #f2dca8; }
.igf-pill--danger { color: #a52a3d; background: #fdecef; border-color: #f3c2cb; }

.o_portal_sale_sidebar #sale_order_sidebar_button { gap: 10px !important; }
.o_portal_sale_sidebar #sale_order_sidebar_button .btn,
.o_portal_sale_sidebar [name="sale_order_actions"] .btn {
  border-radius: 10px; font-weight: 650; padding: 11px 18px; font-size: 15px;
}
.o_portal_sale_sidebar #sale_order_sidebar_button .btn-primary,
.o_portal_sale_sidebar [name="sale_order_actions"] .btn-primary {
  background: var(--igf-navy); border-color: var(--igf-navy); color: #fff;
  box-shadow: 0 4px 14px rgba(20, 38, 61, .18);
}
.o_portal_sale_sidebar #sale_order_sidebar_button .btn-primary:hover,
.o_portal_sale_sidebar [name="sale_order_actions"] .btn-primary:hover { background: var(--igf-action); border-color: var(--igf-action); }
.o_portal_sale_sidebar #sale_order_sidebar_button .btn-light,
.o_portal_sale_sidebar [name="sale_order_actions"] .btn-light {
  background: #fff; border: 1px solid var(--igf-line); color: var(--igf-navy);
}
.o_portal_sale_sidebar #sale_order_sidebar_button .btn-light:hover,
.o_portal_sale_sidebar [name="sale_order_actions"] .btn-light:hover { border-color: var(--igf-action); color: var(--igf-action); background: var(--igf-tint); }

.o_portal_sale_sidebar .navspy { display: none !important; }
.o_portal_sale_sidebar #sidebar_content h6 { margin: 0 0 8px; }
.o_portal_sale_sidebar #sidebar_content h6 small { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--igf-muted) !important; }
.o_portal_sale_sidebar .o_portal_contact_details { padding-top: 16px; border-top: 1px solid var(--igf-line); }
.o_portal_sale_sidebar .o_portal_contact_details .o_avatar { width: 44px; height: 44px; object-fit: cover; border-radius: 50% !important; }
.o_portal_sale_sidebar .o_portal_contact_details > .d-flex > div > span { font-weight: 650; color: var(--igf-navy); }
.igf-contact-lines { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.igf-contact-lines a { color: var(--igf-action); text-decoration: none; overflow-wrap: anywhere; }
.igf-contact-lines a:hover { text-decoration: underline; }
.igf-contact-lines .fa { width: 16px; color: var(--igf-muted); }

/* ---------- Document header ---------- */
.o_portal_sale_sidebar #introduction { padding: 0 0 4px !important; border: 0 !important; }
.o_portal_sale_sidebar #intro_row { align-items: center; flex-wrap: wrap; }
.o_portal_sale_sidebar #introduction h2 { font-size: 30px; font-weight: 750; letter-spacing: -.03em; color: var(--igf-navy); margin: 0; }
.o_portal_sale_sidebar #introduction h2 em { font-style: normal; color: var(--igf-action); }

/* ---------- Info cards ---------- */
.o_portal_sale_sidebar #informations { margin-top: 18px; row-gap: 16px; }
.o_portal_sale_sidebar #informations > div { margin-bottom: 0 !important; }
.o_portal_sale_sidebar #informations > [class*="col-"] {
  position: relative; isolation: isolate;
  padding: 18px calc(var(--bs-gutter-x, 1.5rem) * .5 + 20px);
}
.o_portal_sale_sidebar #informations > [class*="col-"]::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0;
  left: calc(var(--bs-gutter-x, 1.5rem) * .5); right: calc(var(--bs-gutter-x, 1.5rem) * .5);
  background: var(--igf-panel); border: 1px solid var(--igf-line); border-radius: var(--igf-radius);
}
.o_portal_sale_sidebar #informations h5 {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--igf-muted); margin: 0 0 10px !important;
}
.o_portal_sale_sidebar #informations h5 a { color: var(--igf-action); }
.o_portal_sale_sidebar #informations hr { display: none; }
.o_portal_sale_sidebar #informations .table { margin: 0; --bs-table-bg: transparent; }
.o_portal_sale_sidebar #sale_info_table th { color: var(--igf-muted); font-weight: 500; padding: 3px 18px 3px 0 !important; }
.o_portal_sale_sidebar #sale_info_table td { color: var(--igf-ink); font-weight: 600; padding: 3px 0 !important; }
.o_portal_sale_sidebar #customer_info address { margin: 0; }
.o_portal_sale_sidebar #customer_info .fa { color: var(--igf-muted); }
.o_portal_sale_sidebar #transaction_info:empty { display: none; }

/* ---------- Lines table ---------- */
.o_portal_sale_sidebar #details { margin-top: 24px; }
.o_portal_sale_sidebar [name="sol_table"] {
  border: 1px solid var(--igf-line); border-radius: var(--igf-radius); overflow: hidden; background: #fff;
}
.o_portal_sale_sidebar #sales_order_table { margin: 0; border-color: var(--igf-line); }
.o_portal_sale_sidebar #sales_order_table thead th {
  background: var(--igf-panel); color: var(--igf-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap; padding: 12px 16px; border-bottom: 1px solid var(--igf-line);
  vertical-align: middle;
}
.o_portal_sale_sidebar #sales_order_table tbody td { padding: 16px; vertical-align: top; border-color: var(--igf-line); }
.o_portal_sale_sidebar #sales_order_table tbody tr:last-child td { border-bottom: 0; }
.o_portal_sale_sidebar #sales_order_table td:not([name="td_product_name"]) { white-space: nowrap; }
.o_portal_sale_sidebar #sales_order_table [name="td_product_quantity"],
.o_portal_sale_sidebar #sales_order_table [name="td_product_priceunit"] { color: var(--igf-ink); }
.o_portal_sale_sidebar #sales_order_table [name="td_product_taxes"] { color: var(--igf-muted); font-size: 13px; }
.o_portal_sale_sidebar #sales_order_table [name="td_product_subtotal"] { font-weight: 700; color: var(--igf-navy); }
.o_portal_sale_sidebar #sales_order_table .o_line_section td { background: var(--igf-tint); color: var(--igf-navy); }
.o_portal_sale_sidebar #sales_order_table .o_line_note td { color: var(--igf-muted); }

.o_portal_sale_sidebar #sales_order_table [name="td_product_name"] { width: 100%; }
.igf-line { min-width: 260px; }
.igf-line-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.igf-code {
  display: inline-block; font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--igf-navy); background: var(--igf-panel); border: 1px solid var(--igf-line); border-radius: 6px; padding: 2px 8px;
  overflow-wrap: anywhere;
}
.o_portal_sale_sidebar .igf-line-title { font-weight: 650; color: var(--igf-navy); line-height: 1.4; text-decoration: none; }
.o_portal_sale_sidebar a.igf-line-title:hover { color: var(--igf-action); text-decoration: underline; }
.igf-line-note { margin-top: 4px; font-size: 13px; color: var(--igf-muted); }
.igf-specs { margin-top: 10px; }
.igf-specs > summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--igf-action);
}
.igf-specs > summary::-webkit-details-marker { display: none; }
.igf-specs > summary::before { content: "\203A"; display: inline-block; font-size: 16px; line-height: 1; transition: transform .15s ease; }
.igf-specs[open] > summary::before { transform: rotate(90deg); }
.igf-specs dl {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 20px; margin: 10px 0 0;
}
.igf-specs dl > div { display: flex; flex-direction: column; padding: 6px 10px; background: var(--igf-panel); border-radius: 8px; }
.igf-specs dt { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--igf-muted); }
.igf-specs dd { margin: 0; font-size: 13.5px; color: var(--igf-ink); }

/* ---------- Totals ---------- */
.o_portal_sale_sidebar #total { margin-top: 16px; }
.o_portal_sale_sidebar #total > div { max-width: 380px; }
.o_portal_sale_sidebar #total .table {
  margin: 0; background: var(--igf-panel); border-radius: var(--igf-radius); overflow: hidden; border: 1px solid var(--igf-line);
  border-collapse: separate; border-spacing: 0;
}
.o_portal_sale_sidebar #total .table td, .o_portal_sale_sidebar #total .table th { padding: 10px 18px; border-color: var(--igf-line); background: transparent; }
.o_portal_sale_sidebar #total .table tr:last-child td, .o_portal_sale_sidebar #total .table tr:last-child th {
  border-bottom: 0; font-size: 18px; font-weight: 750; color: var(--igf-navy); padding-top: 14px; padding-bottom: 14px;
}

/* ---------- Terms ---------- */
.o_portal_sale_sidebar #terms, .o_portal_sale_sidebar #terms + section { margin-top: 28px !important; }
.o_portal_sale_sidebar #terms h4, .o_portal_sale_sidebar #terms + section h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--igf-muted); margin-bottom: 8px;
}
.o_portal_sale_sidebar #terms hr, .o_portal_sale_sidebar #terms + section hr { display: none; }
.o_portal_sale_sidebar #terms em { font-style: normal; color: var(--igf-muted); font-size: 14px; }
.o_portal_sale_sidebar #terms a { color: var(--igf-action); }

/* ---------- Bottom call to action ---------- */
.o_portal_sale_sidebar [name="sale_order_actions"] {
  display: flex !important; flex-wrap: wrap; align-items: center; justify-content: flex-end !important; gap: 12px !important;
  margin-top: 8px; padding: 18px 22px; background: var(--igf-navy); border-radius: var(--igf-radius); color: #fff;
}
.o_portal_sale_sidebar [name="sale_order_actions"] > div { margin: 0 !important; }
.o_portal_sale_sidebar [name="sale_order_actions"]::before {
  content: "Ready to go ahead?"; order: -1; margin-right: auto; font-size: 17px; font-weight: 700; color: #fff;
}
.o_portal_sale_sidebar [name="sale_order_actions"] .btn-primary { background: var(--igf-teal); border-color: var(--igf-teal); color: var(--igf-navy); box-shadow: none; }
.o_portal_sale_sidebar [name="sale_order_actions"] .btn-primary:hover { background: #fff; border-color: #fff; color: var(--igf-navy); }

/* ---------- Communication history ---------- */
.o_portal_sale_sidebar #quote_content > hr { border-color: var(--igf-line); opacity: 1; margin: 32px 0 24px; }
.o_portal_sale_sidebar #sale_order_communication h3 { font-size: 20px; font-weight: 700; color: var(--igf-navy); }

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  .o_portal_sale_sidebar #sidebar_content > .position-relative h2 { font-size: 32px; }
  .o_portal_sale_sidebar [name="sale_order_actions"]::before { flex: 1 1 100%; }
  .o_portal_sale_sidebar #sidebar_content { padding: 18px !important; }
  .o_portal_sale_sidebar #introduction h2 { font-size: 24px; }
  .o_portal_sale_sidebar #sales_order_table thead th, .o_portal_sale_sidebar #sales_order_table tbody td { padding: 12px 10px; }
  .igf-line { min-width: 0; }
  .igf-specs dl { grid-template-columns: 1fr 1fr; gap: 6px; }
  .o_portal_sale_sidebar #total > div { max-width: none; }
  .o_portal_sale_sidebar [name="sale_order_actions"] { justify-content: stretch !important; }
  .o_portal_sale_sidebar [name="sale_order_actions"] > div { flex: 1 1 100%; }
  .o_portal_sale_sidebar [name="sale_order_actions"] .btn { width: 100%; min-height: 48px; }
}
@media (max-width: 575px) {
  .o_portal_sale_sidebar #sales_order_table thead { display: none; }
  .o_portal_sale_sidebar #sales_order_table tbody tr[name="tr_product"] {
    display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--igf-line);
  }
  .o_portal_sale_sidebar #sales_order_table tbody tr[name="tr_product"]:last-child { border-bottom: 0; }
  .o_portal_sale_sidebar #sales_order_table tbody tr[name="tr_product"] > td { border: 0; padding: 0 14px; }
  .o_portal_sale_sidebar #sales_order_table tbody tr[name="tr_product"] > td.d-none { display: none !important; }
  .o_portal_sale_sidebar #sales_order_table tbody tr[name="tr_product"] > [name="td_product_name"] { grid-column: 1 / -1; padding-top: 14px; }
  .o_portal_sale_sidebar #sales_order_table tbody tr[name="tr_product"] > [name="td_product_quantity"] { text-align: left !important; padding: 12px 14px 14px; color: var(--igf-muted); }
  .o_portal_sale_sidebar #sales_order_table tbody tr[name="tr_product"] > [name="td_product_subtotal"] { padding: 12px 14px 14px; }
}
@media print {
  .o_portal_sale_sidebar #sidebar_content { box-shadow: none; }
}