@import url('../../../gbhost/public/gbstyle/gbcommonstyle.scss');

.title{
  display: block;
  height: 32px;
  font-weight: 700;
  font-size: 20px;
  color: var(--action-primary-default);
  position: relative;
  top: 0px;
  width: fit-content;
}

.LightBox-Save {
  font-weight: 700;
  font-size: 12px;
  background-color: #32AE73;
  color: #fff;
  min-width: 120px;
  height: 32px;
  border-radius: 4px;
}

.LightBox-Save:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.LightBox-Save {
  font-weight: 700;
  font-size: 12px;
  background-color: #32AE73;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline-style: none;
  min-width: 120px;
  height: 32px;
  border-radius: 4px;
}

.SubHeading {
  font-size: 11px;
  height: 16.5px;
  color: rgba(79, 71, 97, 1);
}

.SubValue {
  font-size: 12px;
  font-weight: 700;
  height: 18px;
}

.SubGroup {
  display: inline-block;
  width: 115px;
  height: 34.5px;
  margin-right: 4px;
  text-align: right;
}


.FormSection{
  background-color: #FFFFFF;
  margin: 0px 8px;
  padding: 10px;
  border-radius: 8px;
  overflow: auto;
}

.FormSectionHeading {
  font-weight: 700;
  font-size: 18px;
  color: rgba(26, 26, 26, 0.87);
}

.GridTotalSection {
  min-width: 380px;
  width: 380px;
  height: 160px;
  border-radius: 8px;
  padding: 8px;
  margin-left: 10px;
  background: rgba(250, 245, 255, 1);
  overflow: auto;
}

.MinimizedSection {
  min-width: 380px;
  width: 380px;
  height: 160px;
  background: rgba(245, 245, 249, 1);
  border-radius: 8px;
  padding: 10px 8px;
  overflow: auto;
  transition: all 1s ease;
}

.MinimizedSectionMatIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 16px;
  color: var(--action-primary-default);
  border-radius: 4px;
  box-shadow: -1px 2px 2px 0px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 1);
  position: fixed;
}

.FormsButtonClass {
  display: flex;
  flex-wrap: wrap;
}

.FormButtonSection {
  min-width: 240px;
  max-width: 240px;
  width: 240px;
  margin: 8px 16px;
  padding: 8px;
  cursor: pointer;
}

.FormButtonTitle {
  font-weight: 700;
  font-size: 12px;
  color: rgba(26, 26, 26, 0.87);
}

.FormButtonDescription {
  font-weight: 400;
  font-size: 11px;
  color: rgba(26, 26, 26, 0.6);
}

.lightboxmodal {
  position: fixed;
  z-index: 999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Main container */
.lightboxmodal-content {
  background-color: #fefefe;
  margin: auto;
  width: min(1150px, 95vw);
  max-width: 95vw;
  height: 350px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* IMPORTANT */
}

/* Fixed header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #ddd;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Scrollable body */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #fff;
  padding: 12px 20px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: flex-end;
}

.particulars-back-btn {
  background-color: #32AE73;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-width: 64px;
  height: 32px;
  border-radius: 4px;
  padding: 0 16px;
}

/* Cancelled watermark overlay */
.cancelled-watermark {
  position: absolute;
  width: 60vw;
  height: 60vh;
  font-size: clamp(80px, 12vw, 210px);
  color: gray;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: rotate(340deg);
  pointer-events: none;
}

/* Main form header area */
.form-header-fields {
  flex-grow: 1;
  overflow: auto;
  margin-right: 10px;
  height: 180px;
  width: min(528px, 100%);
}

/* Stacked field container (number + date) */
.stacked-field {
  height: 85px;
  margin-left: 20px;
}

/* Party field container */
.party-field {
  height: 75px;
  margin-right: 14px;
}

// ── Document Information Card (new collapsible header design) ────────

.mm-info-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  margin: 0 8px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.mm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0px;
  background-color: var(--bg-subtle);
  // border-bottom: 1px solid #e8e8e8;
  cursor: pointer;
  user-select: none;
  min-height: 40px;

  // &:hover {
  //   background: rgba(0, 0, 0, 0.03);
  // }
}

.mm-card-header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(var(--space-xs) * 1px);
}

.mm-card-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(26, 26, 26, 0.87);
}

.mm-chip {
  display: inline-flex;
  align-items: center;
  padding-top: calc(var(--space-xs) * 1px);
  padding-right: calc(var(--space-s) * 1px);
  padding-bottom: calc(var(--space-xs) * 1px);
  padding-left: calc(var(--space-s) * 1px);
  border-radius: calc(var(--size-radius-l) * 1px);
  // font-size: calc(var(--))
  // font-weight: 500;
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mm-collapse-arrow {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: #111827;
  flex-shrink: 0;
}

.mm-card-body {
  background-color: var(--bg-subtle);
  border-color: var(--border-subtle);
  padding-top: calc(var(--space-m) * 1px);
  padding-right: calc(var(--space-l) * 1px);
  padding-bottom: calc(var(--space-m) * 1px);
  padding-left: calc(var(--space-l) * 1px);
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-l) * 1px);
  overflow: auto;
  border-radius: calc(var(--size-radius-m) * 1px);
}

.mm-form-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 4px;
  min-height: 36px;
}

// ── Totals Bar ───────────────────────────────────────────────────────

.mm-totals-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: calc(var(--space-l) * 1px);
}

.mm-total-item {
  width:140px;
  
  &:last-of-type {
    border-right: none;
  }

  &.mm-total-item--bill {
    border-right: none;
  }
}

.mm-total-label {
  font-size: 10px;
  color: rgba(26, 26, 26, 0.5);
  white-space: nowrap;
  line-height: 1.4;
}

.mm-total-value {
  font-size: 12px;
  font-weight: 700;
  color: rgba(26, 26, 26, 0.87);
  white-space: nowrap;

  &.mm-total-value--bill {
    font-size: 14px;
    color: var(--action-primary-default);
  }
}

.mm-total-remarks {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

// ── Inline Action Button Bar ─────────────────────────────────────────

.mm-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 8px 8px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.mm-action-btn {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(26, 26, 26, 0.75);
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  outline: none;

  &:hover {
    border-color: var(--action-primary-default);
    color: var(--action-primary-default);
    background: rgba(232, 240, 254, 0.5);
  }

  &:active {
    background: rgba(232, 240, 254, 1);
  }
}

.party-code-label {
  display: block;
  text-align: right;
  font-size: 10px;
  height: 15px;
}

/* ------------------------------------------------------------------ */
/* RTL support                                                          */
/* ------------------------------------------------------------------ */

[dir="rtl"] .adjacentField {
  margin-right: 0;
  margin-left: 14px;
}

[dir="rtl"] .party-field {
  margin-right: 0;
  margin-left: 14px;
}

[dir="rtl"] .form-header-fields {
  margin-right: 0;
  margin-left: 10px;
}

[dir="rtl"] .GridTotalSection {
  margin-left: 0;
  margin-right: 10px;
}

[dir="rtl"] .MinimizedSection {
  margin-left: 0;
  margin-right: 10px;
}

[dir="rtl"] .SubGroup {
  text-align: left;
}

[dir="rtl"] .modal-footer {
  flex-direction: row-reverse;
}


[dir="rtl"] .mm-card-header-left {
  flex-direction: row-reverse;
}

[dir="rtl"] .mm-info-card {
  margin: 0 8px 12px;
}

[dir="rtl"] .mm-form-row {
  flex-direction: row-reverse;
  column-gap: 16px;
}

[dir="rtl"] .modal-header .closeicon {
  order: -1;
}

[dir="rtl"] .FormButtonSection {
  margin: 8px 16px 8px 0;
}
