/* Invo Joele — thin helpers on top of shared hrm-rtl.css (same look as HRM/CS) */

/* Keep money / codes LTR inside RTL pages */
[dir="rtl"] .dataTablesCard td[dir="ltr"],
[dir="rtl"] .dataTablesCard th[dir="ltr"],
[dir="rtl"] .hrm-dash-kpi__value[dir="ltr"] {
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

/* Official Saudi Riyal symbol + optional USD original */
.invo-money {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
  direction: ltr;
}

.invo-money__value {
  font-weight: inherit;
}

.invo-money__symbol {
  display: inline-block;
  width: 0.85em;
  height: 0.95em;
  vertical-align: -0.08em;
  flex-shrink: 0;
}

.invo-money__usd {
  opacity: 0.78;
  font-size: 0.86em;
  font-weight: 500;
}

.hrm-dash-kpi .invo-money,
.badge .invo-money {
  color: inherit;
}

.hrm-dash-kpi .invo-money__symbol,
.badge.bg-primary .invo-money__symbol,
.badge.bg-success .invo-money__symbol,
.badge.bg-info .invo-money__symbol,
.badge.bg-danger .invo-money__symbol {
  filter: brightness(0) invert(1);
}

.hrm-dash-kpi .invo-money__usd {
  opacity: 0.9;
}

/* Searchable vendor picker */
.invo-vendor-picker {
  position: relative;
}

.invo-vendor-picker__menu {
  display: block;
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 0.2rem);
  z-index: 30;
  max-height: 16rem;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: 1px solid #e6e8ec;
  border-radius: 0.45rem;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
  background: #fff;
}

.invo-vendor-picker__list {
  max-height: 12rem;
  overflow: auto;
}

.invo-vendor-picker__list .dropdown-item {
  white-space: normal;
}

[data-theme-version="dark"] .invo-vendor-picker__menu {
  background: #1a212b;
  border-color: #2d3644;
}

/* Receipt upload icon button in expense rows */
label.tbl-btn-icon {
  cursor: pointer;
  margin: 0;
}

label.tbl-btn-icon.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* KPI cards used as static blocks (not links) */
div.hrm-dash-kpi {
  cursor: default;
}

[x-cloak] {
  display: none !important;
}

/* Amount + SAR/USD toggle (expense form + scan review) */
.invo-amount-field {
  width: 100%;
}

.invo-amount-input {
  flex-wrap: nowrap;
}

.invo-amount-input > .form-control {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.invo-currency-btn {
  flex: 0 0 auto;
  min-width: 3.4rem;
  padding-inline: 0.7rem;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  border: 1px solid #ced4da;
  background: #f8f9fb;
  color: #495057;
  box-shadow: none;
}

.invo-currency-btn + .invo-currency-btn {
  margin-inline-start: -1px;
}

.invo-currency-btn.is-active {
  background: var(--primary, #0d6efd);
  border-color: var(--primary, #0d6efd);
  color: #fff;
  z-index: 2;
}

.invo-currency-btn:hover:not(.is-active) {
  background: #eef1f5;
  color: #212529;
}

.invo-amount-suffix {
  min-width: 2.5rem;
  justify-content: center;
}

.invo-amount-hint {
  font-variant-numeric: tabular-nums;
}

[data-theme-version="dark"] .invo-currency-btn {
  background: #1a212b;
  border-color: #2d3644;
  color: #c5cdd8;
}

[data-theme-version="dark"] .invo-currency-btn.is-active {
  background: var(--primary, #0d6efd);
  border-color: var(--primary, #0d6efd);
  color: #fff;
}

[data-theme-version="dark"] .invo-currency-btn:hover:not(.is-active) {
  background: #243041;
  color: #fff;
}

/* Vendor / brand logo */
.invo-vendor-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  border-radius: 0.4rem;
  background: #fff;
  border: 1px solid #e6e8ec;
  vertical-align: middle;
  flex-shrink: 0;
}

.invo-vendor-logo--sm {
  width: 1.75rem;
  height: 1.75rem;
}

.invo-vendor-logo--lg {
  width: 3.5rem;
  height: 3.5rem;
}

.invo-vendor-logo--placeholder {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #495057;
  background: #eef1f5;
}

.invo-vendor-logo--sm.invo-vendor-logo--placeholder {
  font-size: 0.6rem;
}

.invo-vendor-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
}

.invo-vendor-cell__name {
  min-width: 0;
  line-height: 1.3;
}

.invo-expense-form {
  border: 1px solid #e6e8ec;
  border-radius: 0.6rem;
  background: #f8f9fb;
  padding: 1.1rem 1.15rem 1.2rem;
}

.invo-expense-form .col-form-label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  padding-bottom: 0;
}

.invo-expense-panel .card-header {
  min-height: 3.25rem;
}

[data-theme-version="dark"] .invo-expense-form {
  background: #1a212b;
  border-color: #2d3644;
}

[data-theme-version="dark"] .invo-vendor-logo {
  background: #1a212b;
  border-color: #2d3644;
}

[data-theme-version="dark"] .invo-vendor-logo--placeholder {
  background: #243041;
  color: #c5cdd8;
}
