/* FAX_CATEGORY_MODAL_BASE_V2 */
#faxCategorySettingsOverlay.modalOverlay{
  position:fixed !important;
  inset:0 !important;
  z-index:10000 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box;
  padding:20px;
  overflow:auto;
  background:rgba(15,23,42,.45);
}

#faxCategorySettingsOverlay .modalCard{
  position:relative;
  display:block;
  box-sizing:border-box;
  width:min(1080px,100%);
  max-height:calc(100vh - 40px);
  overflow:auto;
  margin:auto;
  padding:18px;
  background:#fff;
  border:1px solid var(--line,#d8dee7);
  border-radius:14px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}

#faxCategorySettingsOverlay .modalHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}

#faxCategorySettingsOverlay .modalHeader > div{
  min-width:0;
}

#faxCategorySettingsOverlay .faxCategoryClose{
  flex:0 0 auto;
}

#faxCategorySettingsOverlay .modalActions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:14px;
}

#faxCategorySettingsOverlay .warningBox{
  padding:10px;
  border:1px solid #ffe082;
  border-radius:8px;
  background:#fff8e1;
  line-height:1.55;
}

@media(max-width:700px){
  #faxCategorySettingsOverlay.modalOverlay{
    padding:8px;
    align-items:flex-start !important;
  }

  #faxCategorySettingsOverlay .modalCard{
    width:100%;
    max-height:calc(100vh - 16px);
    padding:14px;
  }

  #faxCategorySettingsOverlay .modalHeader{
    gap:8px;
  }
}

@media print{
  #faxCategorySettingsOverlay{
    display:none !important;
  }
}

.faxCategorySettingsModal{
  width:min(1080px,calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  overflow:auto;
}
.faxCategorySettingsModal .modalHeader{
  align-items:flex-start;
}
.faxCategorySettingsModal .modalHeader h2{
  margin:0 0 4px;
}
.faxCategoryForm{
  margin-top:14px;
  padding:14px;
  border:1px solid #d8dde3;
  border-radius:10px;
  background:#f8fafb;
}
.faxCategoryForm h3{margin:0 0 12px}
.faxCategoryForm textarea{min-height:88px;resize:vertical}
.faxCategoryListHeader{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin-top:18px;
}
.faxCategoryListHeader h3{margin:0}
.faxCategoryTableWrap{
  margin-top:10px;
  overflow:auto;
  border:1px solid #d8dde3;
  border-radius:10px;
}
.faxCategoryTable{
  width:100%;
  min-width:850px;
  border-collapse:collapse;
}
.faxCategoryTable th,
.faxCategoryTable td{
  padding:9px;
  border-bottom:1px solid #e2e6ea;
  vertical-align:top;
  text-align:left;
}
.faxCategoryTable th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f4f6f8;
  white-space:nowrap;
}
.faxCategoryTable tr:last-child td{border-bottom:0}
.faxCategoryTable .categoryDisabled{opacity:.62;background:#fafafa}
.categoryOrder{width:74px;white-space:nowrap}
.categoryOrder .miniBtn{width:30px;padding:4px 2px}
.categoryKey{margin-top:3px;color:#75808b;font-size:10px;word-break:break-all}
.requiredBadge{
  display:inline-block;
  margin-top:4px;
  padding:1px 6px;
  border-radius:999px;
  background:#fff4d6;
  color:#8a5a00;
  font-size:10px;
}
.categoryDescription{font-size:12px;line-height:1.55}
.categoryKeywords{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.categoryKeywords span{
  display:inline-block;
  padding:2px 6px;
  border-radius:999px;
  background:#eef3f7;
  color:#425466;
  font-size:10px;
}
.categoryKeywords span.empty{background:transparent;color:#8a939c;padding-left:0}
.categoryCount{width:64px;white-space:nowrap}
.categoryState{
  display:inline-block;
  min-width:42px;
  padding:2px 7px;
  border-radius:999px;
  text-align:center;
  font-size:11px;
  font-weight:700;
}
.categoryState.on{background:#e7f0e8;color:#1b5e20}
.categoryState.off{background:#eef1f4;color:#67727d}
.categoryActions{width:138px;white-space:nowrap}
.categoryActions .miniBtn{margin:0 3px 4px 0}
.dangerText{color:#b3261e!important}
.faxCategoryStatus{margin-top:12px;white-space:pre-wrap}
.faxCategoryStatus.success{border-color:#b8d4bc;background:#eef7ef;color:#1b5e20}
.faxCategoryStatus.error{border-color:#ffcdd2;background:#fff1f2;color:#b3261e}
@media(max-width:700px){
  .faxCategorySettingsModal{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}
  .faxCategoryListHeader{align-items:stretch;flex-direction:column}
  .faxCategoryListHeader .ghost{width:100%}
}
