/* ***CASSIOPEIA GENERAL*** */

/* Logo header adjustment */
.container-header .grid-child {
  margin-left: 2rem !important;
  margin-right: auto !important;
}

/* GLOBAL TYPOGRAPHY SCALE – reduce all text to ~85% */
html {
  font-size: 85%;
}
/* Reduce heading sizes so they match the 85% global scale visually */
h1 { font-size: 2.1rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }


/* Hide login - full page */
.com-users-login {
  display: none;
}

/* Smaller side-bars */
/* Custom properties — cPanel lint incorrectly flags these */
.has-sidebar-left .site-grid {
  grid-template-columns: minmax(0,1fr) 12% repeat(2,minmax(0,76%)) 12% minmax(0,1fr);
}

/* reduce padding in lists */
.table th,
.table td {
  padding: 0rem 0.25rem;
}


/* ***CASSIOPEIA *** */


/* ============================================================
   ICON SYSTEM — Joomla, Cassiopeia, Fabrik
   ============================================================ */


/* ------------------------------------------------------------
   1) Base styling + DEFAULT icon for ANY "icon-*"
   ------------------------------------------------------------ */
[class^="icon-"],
[class*=" icon-"] {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 2px;
  vertical-align: middle;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("../images/icons/default.svg"); /* fallback icon */
}

/* Kill any old font-based pseudo-elements on icon-* */
[class^="icon-"]::before,
[class*=" icon-"]::before {
  content: '' !important;
}

/* Convenience: generic .icon class (optional) */
.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 2px;
  vertical-align: middle;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.icon::before,
.icon::after {
  content: '' !important;
}


/* ------------------------------------------------------------
   2) Base styling + DEFAULT icon for ANY "fa" / FA-like icons
      (because Fabrik still outputs <span class="fa fa-edit">)
   ------------------------------------------------------------ */
.fa,
[class^="fa-"],
[class*=" fa-"] {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 2px;
  vertical-align: middle;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("../images/icons/default.svg"); /* fallback icon */
}

/* Kill FA pseudo-elements (no more FA fonts) */
.fa::before,
[class^="fa-"]::before,
[class*=" fa-"]::before {
  content: '' !important;
}


/* ------------------------------------------------------------
   3) Specific SVG mappings — these override both fallbacks
   ------------------------------------------------------------ */

/* Joomla / Custom Icons */
.icon-arrow-down   { background-image: url("../images/icons/sort-down.svg"); }
.icon-arrow-left   { background-image: url("../images/icons/arrow-left.svg"); }
.icon-arrow-right  { background-image: url("../images/icons/arrow-right.svg"); }
.icon-backward-2   { background-image: url("../images/icons/arrow-left.svg"); }
.icon-calendar     { background-image: url("../images/icons/calendar.svg"); }
.icon-checkmark    { background-image: url("../images/icons/checkmark.svg"); }
.icon-config       { background-image: url("../images/icons/config.svg"); }
.icon-db           { background-image: url("../images/icons/db.svg"); }
.icon-delete       { background-image: url("../images/icons/delete.svg"); }
.icon-download     { background-image: url("../images/icons/download.svg"); }
.icon-edit         { background-image: url("../images/icons/edit.svg"); }
.icon-eye          { background-image: url("../images/icons/eye.svg"); }
.icon-eye-open, .icon-star { background-image: url("../images/icons/eye-open.svg"); }
.icon-forbidden    { background-image: url("../images/icons/forbidden.svg"); }
.icon-home         { background-image: url("../images/icons/home.svg"); }
.icon-info         { background-image: url("../images/icons/info.svg"); }
.icon-lightning    { background-image: url("../images/icons/lightning.svg"); }
.icon-link         { background-image: url("../images/icons/link.svg"); }
.icon-list-view    { background-image: url("../images/icons/list-view.svg"); }
.icon-minus        { background-image: url("../images/icons/minus.svg"); }
.icon-passkey-body { background-image: url("../images/icons/passkey-body.svg"); }
.icon-plus         { background-image: url("../images/icons/add.svg"); }
.icon-print        { background-image: url("../images/icons/print.svg"); }
.icon-remove       { background-image: url("../images/icons/no.svg"); }
.icon-search       { background-image: url("../images/icons/search.svg"); }
.icon-sort         { background-image: url("../images/icons/sort.svg"); }
.icon-sort-down    { background-image: url("../images/icons/sort-down.svg"); }
.icon-sort-up      { background-image: url("../images/icons/sort-up.svg"); }
.icon-stats        { background-image: url("../images/icons/stats.svg"); }
.icon-sync         { background-image: url("../images/icons/sync.svg"); }
.icon-tip          { background-image: url("../images/icons/tip.svg"); }
.icon-undo         { background-image: url("../images/icons/undo.svg"); }
.icon-upload       { background-image: url("../images/icons/upload.svg"); }
.icon-user         { background-image: url("../images/icons/user.svg"); }
.icon-warning      { background-image: url("../images/icons/warning.svg"); }
.icon-onedrive     { background-image: url("../images/icons/onedrive.svg"); }

/* Larger icons */
.icon-onedrive, .icon-print {
    width: 32px;
    height: 32px;
    text-align: center;
}

/* itpilot */
.lots           { background-image: url("../images/icons/lots.svg"); }
.register_lot        { background-image: url("../images/icons/register_lot.svg"); }
.add_new_lot         { background-image: url("../images/icons/add_new_lot.svg"); }
.lot_to_be_allocated { background-image: url("../images/icons/lot_to_be_allocated.svg"); }
.lot_not_allocated   { background-image: url("../images/icons/lot_not_allocated.svg"); }
.lot_allocated       { background-image: url("../images/icons/lot_allocated.svg"); }

/* Fabrik list action icons (FA classes) */
.fa-edit      { background-image: url("../images/icons/edit.svg"); }
.fa-expand    { background-image: url("../images/icons/expand.svg"); }
.fa-question-circle { background-image: url("../images/icons/info.svg"); }
.fa-search    { background-image: url("../images/icons/search.svg"); }
.fa-sort-down { background-image: url("../images/icons/sort-down.svg"); }
.fa-sort-up   { background-image: url("../images/icons/sort-up.svg"); }
.fa-times     { background-image: url("../images/icons/no.svg"); }
.fa-trash     { background-image: url("../images/icons/delete.svg"); }

/* Enlarge Tooltip font and popup size  */
.tooltip-inner {
    max-width: 325px; /* Adjust as needed */
    width: auto;
    font-size: 110%;
}
/* Add space between tooltip and validation when in tooltip popup  */
.tooltip .validation-notices li:has(.icon-eye-open) {
  margin-top: 10px;
}


/* ------------------------------------------------------------ */


/* *** Business Central / OData UI *** */

.table-container { 
  transform: scale(0.7); 
  transform-origin: top left; 
  margin-bottom: 0; 
}

.column-controls { 
  margin: 20px 0; 
  padding: 15px; 
  background-color: #f8f9fa; 
  border-radius: 5px; 
}

.column-checkbox { 
  margin-right: 10px; 
  margin-bottom: 5px; 
}

.odata-output { 
  padding: 15px; 
  background-color: #e9ecef; 
  border-radius: 5px; 
}

.odata-output code { 
  background-color: white; 
  padding: 10px; 
  border-radius: 3px; 
  display: block; 
  word-wrap: break-word; 
}

.database-controls { 
  margin: 20px 0; 
  padding: 15px; 
  background-color: #fff3cd; 
  border-radius: 5px; 
  border: 1px solid #ffeaa7; 
}

.sync-button { 
  background-color: #007bff; 
  color: white; 
  padding: 10px 20px; 
  border: none; 
  border-radius: 5px; 
  cursor: pointer; 
  margin: 5px; 
}

.sync-button:hover { 
  background-color: #0056b3; 
}

.sync-button:disabled { 
  background-color: #6c757d; 
  cursor: not-allowed; 
}

.metadata-section { 
  background-color: #e3f2fd; 
  border-left: 4px solid #2196f3; 
  padding: 15px; 
  margin: 10px 0; 
}

.odata-builder { 
  background-color: #f3e5f5; 
  border-left: 4px solid #9c27b0; 
  padding: 15px; 
  margin: 10px 0; 
}

.success { 
  color: #28a745; 
}

.error { 
  color: #dc3545; 
}

.warning { 
  color: #fd7e14; 
}

/* Hide labels where input has @odata.etag 
   :has() works in modern browsers but older validators show errors */
label.column-checkbox:has(input[value="@odata.etag"]) {
  display: none !important;
}


/* ***FABRIK*** */


/* Hide "Empty" option */
.doempty  {
    display:none;
}

/* Extend space belove SAVE buttons */
  .btn.btn-primary.button.save {
    margin-bottom: 2rem;
  }
  
/* Hide the first <br> that comes right after a <select> inside FabrikElement */
.fabrikElement select + br {
    display: none;
}

  .fabrikErrorMessage.help-inline.text-danger {
    font-weight: 700;
  }

.form-check-input {
  border: var(--border-width) solid #5f6162 !important;
}

.ui-draggable-handle {
    margin-bottom: 1.5rem;
}

.fa-expand{
    margin-right: 4px;
}

.fabrikRepeatData {
  margin-block-end: 0em;
}

.mt-3 {
  margin-top: 0.5rem !important;
  margin-bottom: 0rem !important;
}

.form-control {
  padding: 0.3rem 0.5rem;
}

/* Custom properties — cPanel lint incorrectly flags these */
.btn {
  --btn-padding-x: 0.5rem;
  --btn-padding-y: 0.3rem;
}

.btn-group {
  margin-bottom: 0rem;
}

.form-select,
.custom-select {
  padding: 0.3rem 1.5rem 0.3rem 0.5rem;
}

.fabrikGroupRepeater {
  border-top: 1px solid grey;
  margin-bottom: -1em;
  padding-top: 0.5rem !important;  /* Also handles add/delete icons spacing */
}

/* List navigation in bottom of list */
.limit {
  padding-top: 0.5rem !important;
}

/* Hide empty labels */
.fabrikEmptyLabel {
  display: none !important;
}
