/* ================================
   Quote Output & Preview styling
   (updated: fixed totals block + tighter right meta spacing)
   ================================ */

/* Page / Header */
.quote-title { font-weight: 700; }

.quote-header{
  border-bottom: 1px solid #e3e3e7;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.card-body{
  padding: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.section-title{
  margin-top: 18px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  font-size: 11px;
  color: #344767;
  border-bottom: 1px solid #e3e3e7;
  padding-bottom: 0.5rem;
}

/* Terms */
.terms{
  padding-left: 18px;
  line-height: 1.7;
  font-size: 0.875rem;
}
.terms li{ margin-bottom: 0.65rem; }

/* Highlight */
.text-danger{
  color: #dc3545 !important;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

/* Regular paragraphs inside quote */
.card-body > p{
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.65rem;
}

/* Members list */
.mb-3{ font-size: 0.875rem; }
.mb-3 p{ margin-bottom: 0.4rem; line-height: 1.5; }
.mb-3 p strong{
  font-weight: 600;
  color: #344767;
  font-size: 0.9rem;
}

/* Footer */
.text-muted{ font-size: 0.8rem; }

/* =========================================
   Quote Info (3-column like screenshot)
   Use this structure in Blade:
   <div class="quote-info">
     <div class="qi-left">...</div>
     <div class="qi-mid">...</div>
     <div class="qi-right">...</div>
   </div>
   ========================================= */
.quote-info{
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  column-gap: 28px;
  row-gap: 6px;
  align-items: start;
}

.qi-line{
  display: flex;
  gap: 10px;
  line-height: 1.25;
  margin: 0;
}

.qi-label{
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
}

.qi-value{ color: #4b5563; }
.qi-wrap .qi-value{
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Right column: tighter spacing for Date/Expiry/ABN */
.qi-right{ text-align: right; }

.qi-pair{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  line-height: 1.1;       /* tighter */
  margin: 0 0 2px 0;      /* reduced vertical gap */
}

.qi-r-label{
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  min-width: 92px;
  text-align: right;
}

.qi-r-value{
  color: #4b5563;
  white-space: nowrap;
}

/* =========================================
   Totals (fixed width + never drifts)
   Use:
   <div class="totals-wrap">
     <div class="totals-box">
       <div class="t-row">...</div>
     </div>
   </div>
   ========================================= */
.totals-wrap{
  display: flex;
  justify-content: flex-end;
}

.totals-box{
  width: 320px;            /* fixed block */
  max-width: 100%;
}

.t-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  line-height: 1.25;
  margin: 0 0 6px 0;
  white-space: nowrap;     /* prevents wrap/move */
}

.t-label{
  font-weight: 600;
  color: #374151;
  text-align: right;
  flex: 1;
}

.t-value{
  color: #4b5563;
  text-align: right;
  min-width: 110px;        /* keeps numbers aligned */
}

/* Grand total emphasis */
.t-total .t-label,
.t-total .t-value{
  font-weight: 800;
  color: #111827;
}

/* If GST row is conditionally hidden, keep spacing stable */
.t-row-placeholder{ visibility: hidden; }

/* Keep your original "totals" class too (if used elsewhere) */
.totals{
  font-weight: 700;
  font-size: 15px;
  color: #344767;
  margin-top: 0.5rem;
}
.totals span{
  font-weight: 700;
  color: #000;
  font-size: 16px;
}

/* =========================================
   Navigation Buttons - Previous and Next
   ========================================= */
.btn-nav-prev{
  background-color: #ffffff;
  color: #344767;
  border: 1px solid #e3e3e7;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: all 0.2s ease;
  min-width: 100px;
  text-align: center;
  white-space: nowrap;
}
.btn-nav-prev:hover:not(.disabled){
  background-color: #f8f9fa;
  border-color: #d1d5db;
  color: #344767;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-nav-prev.disabled,
.btn-nav-prev:disabled{
  background-color: #f8f9fa;
  color: #adb5bd;
  border-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-nav-next{
  background-color: #5e72e4;
  color: #ffffff;
  border: 1px solid #5e72e4;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: all 0.2s ease;
  min-width: 100px;
  text-align: center;
  white-space: nowrap;
}
.btn-nav-next:hover:not(.disabled){
  background-color: #4c63d2;
  border-color: #4c63d2;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(94,114,228,0.3);
}
.btn-nav-next.disabled,
.btn-nav-next:disabled{
  background-color: #adb5bd;
  border-color: #adb5bd;
  color: #ffffff;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Ensure nav buttons align nicely */
.card-body .d-flex.flex-column.align-items-end,
.card-header .d-flex.justify-content-end{
  align-items: flex-end !important;
}
.card-body .d-flex.gap-2,
.card-header .d-flex.gap-2{
  gap: 0.5rem !important;
}

/* =========================================
   Toast Notification Styling
   ========================================= */
.swal2-toast{
  box-shadow: 0 8px 26px -4px rgba(20,27,201,0.15), 0 8px 9px -5px rgba(20,27,201,0.06) !important;
  border-radius: 0.75rem !important;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 1rem 1.25rem !important;
  min-width: 300px !important;
  max-width: 400px !important;
}
.swal2-toast .swal2-title{
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #344767 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
}
.swal2-toast .swal2-icon{
  width: 2.5rem !important;
  height: 2.5rem !important;
  margin: 0 0.75rem 0 0 !important;
}
.swal2-toast .swal2-icon.swal2-success{ border-color:#5e72e4 !important; color:#5e72e4 !important; }
.swal2-toast .swal2-icon.swal2-error{ border-color:#f5365c !important; color:#f5365c !important; }
.swal2-toast .swal2-icon.swal2-warning{ border-color:#fb6340 !important; color:#fb6340 !important; }
.swal2-toast .swal2-icon.swal2-info{ border-color:#11cdef !important; color:#11cdef !important; }
.swal2-toast .swal2-timer-progress-bar{
  background: linear-gradient(90deg, rgba(94,114,228,0.3), rgba(94,114,228,0.1)) !important;
  height: 3px !important;
}
.swal2-toast.swal2-show{ animation: slideInRight 0.3s ease-out !important; }
.swal2-toast.swal2-hide{ animation: slideOutRight 0.3s ease-in !important; }

@keyframes slideInRight{
  from{ transform: translateX(100%); opacity: 0; }
  to{ transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight{
  from{ transform: translateX(0); opacity: 1; }
  to{ transform: translateX(100%); opacity: 0; }
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 992px){
  .quote-info{
    grid-template-columns: 1fr;
    row-gap: 10px;
  }
  .qi-right{ text-align: left; }
  .qi-pair{ justify-content: flex-start; }
  .qi-r-label{ text-align: left; min-width: 92px; }
}

/* =========================================
   Print Styles - match screen + stable layout
   ========================================= */
@media print{
  @page{ margin: 1.5cm; size: A4; }

  *{
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html, body{
    background: #fff !important;
    font-size: 10pt;
  }

  /* Hide UI outside quote */
  .col-12.mb-2,
  .card-header,
  .btn,
  nav,
  aside,
  header,
  footer,
  .sidenav,
  .navbar{
    display: none !important;
  }

  .container{
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .card{
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .card-body{
    padding: 1.5rem !important;
    font-size: 9pt !important;
  }

  .text-danger{ font-size: 9.5pt !important; }

  .section-title{
    font-size: 9.5pt !important;
    margin-top: 15px !important;
  }

  .terms{ font-size: 8.5pt !important; padding-left: 15px !important; }
  .terms li{ margin-bottom: 0.55rem !important; }

  .text-muted{ font-size: 8pt !important; }

  /* Keep blocks together */
  .quote-info,
  .section-title,
  .terms li,
  .totals-wrap,
  .card-body > *{
    page-break-inside: avoid;
  }

  /* Keep totals + right meta stable */
  .totals-box{ width: 320px !important; }
  .t-row{ white-space: nowrap !important; }
  .qi-pair{ margin-bottom: 2px !important; }
}
