/* OMEGATE Health brand overrides — colors from palette.json, Cairo font (Arabic + Latin) */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');
@import url('omegate-glass.css?v=2'); /* glass design layer (public/css/omegate-glass.css) */

:root,
[data-bs-theme],
[data-bs-theme-color] {
  --omegate-orange: #FF7A1F;
  --omegate-ink: #1D1D1B;
  --omegate-font: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;

  --bs-primary: #FF7A1F;
  --bs-primary-rgb: 255, 122, 31;
  --bs-primary-bg-subtle: #FFEDDD;
  --bs-primary-border-subtle: #FFD6B3;
  --bs-primary-text-emphasis: #9E3C0E;
  --bs-link-color: #EB620E;
  --bs-link-color-rgb: 235, 98, 14;
  --bs-link-hover-color: #C74C0A;
  --bs-link-hover-color-rgb: 199, 76, 10;
  --bs-primary-hover-bg: #EB620E;
  --bs-primary-hover-border: #C74C0A;
  --bs-primary-active-bg: #EB620E;
  --bs-primary-active-border: #C74C0A;

  --bs-font-sans-serif: var(--omegate-font);
  --bs-body-font-family: var(--omegate-font);
  --bs-heading-font-family: var(--omegate-font);
  --bs-btn-font-family: var(--omegate-font);
}

[data-bs-theme=dark],
[data-bs-theme-color][data-bs-theme=dark] {
  --bs-primary-text-emphasis: #FFB880;
  --bs-primary-bg-subtle: #451805;
  --bs-primary-border-subtle: #7D3211;
  --bs-link-color: #FF994D;
  --bs-link-color-rgb: 255, 153, 77;
  --bs-link-hover-color: #FFB880;
  --bs-link-hover-color-rgb: 255, 184, 128;
}

/* Arabic-capable font: text inherits from body; form controls don't inherit, so set them.
   Element-only selectors keep icon-font classes (higher specificity) untouched. */
[dir=rtl] {
  --omegate-font: 'Cairo', system-ui, Tahoma, Arial, sans-serif;
}
body, h1, h2, h3, h4, h5, h6, input, select, textarea, button {
  font-family: var(--omegate-font);
}
/* the frontend theme sets a Latin-only handwriting font (Kalam) on section labels */
body .section-title .sub-title,
body .vector-title {
  font-family: var(--omegate-font);
}

/* homepage banner with no slider images: the content is absolutely centred over the
   images, so without them the wrapper has no height; let the content set the height */
.banner-section-wrapper--no-slides {
  background: linear-gradient(135deg, #FFEDDD 0%, #FFF8F2 55%, #FFFFFF 100%);
}
.banner-section-wrapper--no-slides .banner-content {
  position: static;
  transform: none;
  padding: 4rem 0;
}

/* admin dashboard stat cards: equal heights, titles wrap, the icon stays inside the card */
.dashboard-card { height: 100%; }
.dashboard-card .card-body > .d-flex > div:first-child { min-width: 0; }
.dashboard-card .card-body h6 { overflow-wrap: break-word; line-height: 1.4; }
.dashboard-card .card-icon { flex-shrink: 0; padding: .75rem !important; }

/* dashboard stat icons (Phosphor line icons in place of the KiviCare pictures) */
.og-stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; font-size: 2rem; line-height: 1;
  color: var(--omegate-orange);
}

.btn-primary {
  --bs-btn-bg: #FF7A1F;
  --bs-btn-border-color: #FF7A1F;
  --bs-btn-hover-bg: #EB620E;
  --bs-btn-hover-border-color: #C74C0A;
  --bs-btn-active-bg: #C74C0A;
  --bs-btn-active-border-color: #C74C0A;
  --bs-btn-disabled-bg: #FF994D;
  --bs-btn-disabled-border-color: #FF994D;
}
/* Secondary = brand ink (light) / soft orange (dark) instead of the theme's pink */
:root, [data-bs-theme], [data-bs-theme-color] {
  --bs-secondary: #1D1D1B;
  --bs-secondary-rgb: 29, 29, 27;
}
[data-bs-theme=dark], [data-bs-theme-color][data-bs-theme=dark] {
  --bs-secondary: #FF994D;
  --bs-secondary-rgb: 255, 153, 77;
}
.btn-secondary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #1D1D1B;
  --bs-btn-border-color: #1D1D1B;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #FF7A1F;
  --bs-btn-hover-border-color: #FF7A1F;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #EB620E;
  --bs-btn-active-border-color: #EB620E;
}
[data-bs-theme=dark] .btn-secondary {
  --bs-btn-color: #1D1D1B;
  --bs-btn-bg: #FF994D;
  --bs-btn-border-color: #FF994D;
}

.btn-outline-primary {
  --bs-btn-color: #EB620E;
  --bs-btn-border-color: #FF7A1F;
  --bs-btn-hover-bg: #FF7A1F;
  --bs-btn-hover-border-color: #FF7A1F;
  --bs-btn-active-bg: #EB620E;
  --bs-btn-active-border-color: #EB620E;
}

/* Type scale (the rem-based UI scales with the root size). The admin carries the theme
   customizer's theme-fs-* class (md: 16px, easy to read); the public site keeps a larger reading size. */
html.theme-fs-sm { font-size: 15px; }
html.theme-fs-md { font-size: 16px; }
html.theme-fs-lg { font-size: 17px; }
html:not([class*="theme-fs-"]) { font-size: 18px; }

/* admin density: one height for toolbar controls (buttons, Select2, search), a lower top bar,
   tighter table cells and page padding */
html[class*="theme-fs-"] { --og-ctl-h: 2.6rem; }
html[class*="theme-fs-"] .content-inner .btn-toolbar .btn,
html[class*="theme-fs-"] .content-inner .btn-toolbar .form-control,
html[class*="theme-fs-"] .content-inner .d-flex > .btn:not(.btn-sm):not(.btn-icon) {
  min-height: var(--og-ctl-h);
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding-top: 0; padding-bottom: 0;
}
html[class*="theme-fs-"] .btn-toolbar .input-group > .form-control { height: var(--og-ctl-h); padding: 0 .85rem; }
html[class*="theme-fs-"] .select2-container .select2-selection--single,
html[class*="theme-fs-"] .select2-container.select2 .select2-selection--single { height: var(--og-ctl-h); display: flex; align-items: center; }
html[class*="theme-fs-"] .select2-container .select2-selection--single .select2-selection__rendered { line-height: var(--og-ctl-h); }
html[class*="theme-fs-"] nav.iq-navbar { padding-top: .5rem !important; padding-bottom: .5rem !important; }
html[class*="theme-fs-"] .table > :not(caption) > * > * { padding: .7rem .9rem; }
html[class*="theme-fs-"] .content-inner { padding: 1.5rem 1.5rem 0; }

/* bulk actions are removed (x-backend.quick-action renders nothing), so hide the row-selection checkbox column */
table.dataTable th:has(#select-all-table),
table.dataTable td:has(> .select-table-row) { display: none; }

/* a .row nested straight in a .row (no column) would double the gutter and stick out of its card */
html[class*="theme-fs-"] .content-inner .row > .row { margin-left: 0; margin-right: 0; }
/* the notifications table has .table-responsive on the <table> itself, which a real table ignores */
.notification-table.table-responsive { display: block; width: 100%; overflow-x: auto; }
/* a .visually-hidden header label is position:absolute: without a positioned scroll box it escapes it and,
   right to left, widens the whole page on a phone (pharmacy sales list was 808px wide at 375px) */
.table-responsive { position: relative; }

/* admin page headline: page title with the breadcrumb under it */
.og-page-head { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
/* the title block sits in the top bar between the sidebar toggle and the bar's tools */
nav.iq-navbar .og-navbar-title { flex: 1 1 auto; min-width: 0; margin-inline: 1rem; }
nav.iq-navbar .og-page-title { font-size: 1.4rem; }
nav.iq-navbar .og-page-title, nav.iq-navbar .og-page-head .breadcrumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1199.98px) {
  /* below xl the bar holds the logo and menu buttons; the title gets its own row under them */
  nav.iq-navbar > .navbar-inner { flex-wrap: wrap; }
  nav.iq-navbar .og-navbar-title { order: 5; flex-basis: 100%; margin: .5rem 0 0; }
  nav.iq-navbar .og-page-title { font-size: 1.2rem; }
  nav.iq-navbar .og-page-head .breadcrumb { display: none; }
}
.og-page-title {
  margin: 0; font-size: 1.85rem; font-weight: 700; line-height: 1.25;
  color: var(--og-text, #1D1D1B);
}
[data-bs-theme=dark] .og-page-title { color: #fff; }
.og-page-head .breadcrumb { font-size: .85rem; opacity: .85; }
@media (max-width: 575.98px) { .og-page-title { font-size: 1.45rem; } }
[dir=rtl] body { line-height: 1.7; }

/* ---- platform dashboard: soft cards, one dark KPI, pastel KPIs, smooth charts ---------------------- */
.og-dash-heading { font-weight: 700; color: var(--og-text, #1D1D1B); margin-bottom: .75rem; }
.og-dash .og-chart-card {
  background: var(--og-table-bg, #fff) !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 1px solid rgba(29, 29, 27, 0.06) !important;
  box-shadow: 0 1px 2px rgba(29, 29, 27, 0.04) !important;
  border-radius: 16px !important;
}
.og-period { position: relative; display: flex; align-items: center; }
.og-period i { position: absolute; inset-inline-start: .8rem; color: #8A8F98; pointer-events: none; }
.og-period .form-select { padding-inline-start: 2.3rem; min-width: 12rem; background-color: var(--og-table-bg, #fff); border-radius: 10px; }
.og-kpi { border-radius: 16px; padding: 1.15rem 1.25rem; height: 100%; border: 1px solid rgba(29, 29, 27, 0.06); }
.og-kpi-dark { background: #3A3A38; color: #fff; border-color: transparent; }
.og-kpi-tint { background: #FFF1E6; }
.og-kpi-grey { background: #F2F2F1; }
.og-kpi-white { background: var(--og-table-bg, #fff); }
.og-kpi-head { display: flex; align-items: center; gap: .6rem; font-weight: 600; margin-bottom: 1rem; }
.og-kpi-icon { width: 2.1rem; height: 2.1rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.15rem; }
.og-kpi-dark .og-kpi-icon { border: 1.5px solid rgba(255, 255, 255, 0.85); }
.og-kpi-tint .og-kpi-icon, .og-kpi-grey .og-kpi-icon, .og-kpi-white .og-kpi-icon { color: var(--omegate-orange); }
.og-kpi-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-bottom: .35rem; }
.og-kpi-value small { font-size: .85rem; font-weight: 600; opacity: .75; }
.og-kpi-trend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .8rem; }
.og-trend-up, .og-trend-down { font-weight: 700; }
.og-trend-up { color: var(--omegate-orange); }
.og-kpi-note { opacity: .75; }
.og-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: #6B7280; }
.og-legend i, .og-legend-list i { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-inline-end: .4rem; }
.og-legend-list li { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; font-size: .9rem; }
.og-mini-stats { display: flex; flex-wrap: wrap; gap: 1rem; }
.og-mini-stats > div { display: flex; flex-direction: column; padding-inline-end: 1rem; border-inline-end: 1px solid rgba(29, 29, 27, 0.12); }
.og-mini-stats > div:last-child { border: 0; padding: 0; }
.og-mini-stats span { font-size: .75rem; color: #6B7280; }
.og-mini-stats strong { font-size: 1.2rem; }
[data-bs-theme=dark] .og-kpi-tint { background: rgba(255, 122, 31, 0.12); }
[data-bs-theme=dark] .og-kpi-grey { background: rgba(255, 255, 255, 0.05); }

/* ---- facility page: subscription status panel, action boxes, owner + info rows ---------------------- */
.og-state-panel { border-radius: 14px; padding: 1rem 1.15rem; border: 1px solid transparent; }
.og-state-panel .og-state-plan { font-size: 1.35rem; font-weight: 700; margin-top: .4rem; }
.og-state-pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; }
.og-state-progress { height: 6px; border-radius: 999px; background: rgba(29, 29, 27, 0.08); }
/* state shown by the pill only, in brand colours: orange (active), orange outline (trial), ink (expired), grey (suspended) */
.og-state-panel { background: rgba(29, 29, 27, 0.03); border-color: rgba(29, 29, 27, 0.08); }
.og-state-active .og-state-pill { background: var(--omegate-orange); color: #fff; }
.og-state-active .progress-bar, .og-state-trial .progress-bar { background: var(--omegate-orange); }
.og-state-trial .og-state-pill { background: transparent; color: var(--omegate-orange); box-shadow: inset 0 0 0 1.5px var(--omegate-orange); }
.og-state-expired .og-state-pill, .og-state-expired .progress-bar { background: var(--omegate-ink); color: #fff; }
.og-state-suspended .og-state-pill, .og-state-suspended .progress-bar { background: #8A8A88; color: #fff; }
.og-action-box { border: 1px solid rgba(29, 29, 27, 0.1); border-radius: 14px; padding: 1rem 1.15rem; }
.og-action-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .9rem; }
.og-action-icon, .og-info-icon {
  flex-shrink: 0; width: 2.2rem; height: 2.2rem; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 122, 31, 0.1); color: var(--omegate-orange); font-size: 1.15rem;
}
.og-seg .btn { min-width: 4.5rem; }
.og-owner { display: flex; align-items: center; gap: .75rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(29, 29, 27, 0.08); }
.og-avatar {
  flex-shrink: 0; width: 3rem; height: 3rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--omegate-orange); color: #fff; font-weight: 700; font-size: 1.1rem;
}
.og-info-list li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px dashed rgba(29, 29, 27, 0.08); }
.og-info-list li:last-child { border-bottom: 0; }
.og-info-label { font-size: .75rem; color: #6B7280; }
.og-info-value { font-weight: 600; overflow-wrap: anywhere; }
.og-info-value[dir=ltr] { text-align: start; unicode-bidi: plaintext; }
[data-bs-theme=dark] .og-state-panel { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }

/* status pills, brand colours only: active solid orange, trial orange outline, expired ink, suspended grey */
.og-pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; line-height: 1.4; }
.og-pill-active { background: var(--omegate-orange); color: #fff; }
.og-pill-trial { color: var(--omegate-orange); box-shadow: inset 0 0 0 1.5px var(--omegate-orange); }
.og-pill-expired { background: var(--omegate-ink); color: #fff; }
.og-pill-suspended { background: #8A8A88; color: #fff; }
.progress-bar.og-bar-full { background: var(--omegate-ink) !important; }
.og-alert { background: #FFF1E6; color: var(--omegate-ink); border: 1px solid #FFD6B3; }
.og-alert i { color: var(--omegate-orange); }

/* tables whose rows open something (facility page, plan pop-up) */
.og-row-links tbody tr { cursor: pointer; }
.og-row-links tbody tr:hover > td, .og-row-links tbody tr:focus-visible > td { background: rgba(255, 122, 31, 0.06); }
.og-row-links tbody tr:focus-visible { outline: 2px solid var(--omegate-orange); outline-offset: -2px; }

/* plans page: type tags, limit chips, details pop-up facts and limit list */
.og-tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: #FFF1E6; color: var(--omegate-orange); }
.og-chip { display: inline-block; font-size: .78rem; padding: .15rem .55rem; border-radius: 8px; background: rgba(29, 29, 27, 0.05); color: var(--omegate-ink); white-space: nowrap; }
.og-chip-more { background: transparent; box-shadow: inset 0 0 0 1px rgba(29, 29, 27, 0.15); }
.og-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 22rem; }
.og-plans-table td { vertical-align: middle; }
.og-fact { height: 100%; border-radius: 12px; padding: .75rem 1rem; background: rgba(29, 29, 27, 0.03); border: 1px solid rgba(29, 29, 27, 0.06); display: flex; flex-direction: column; gap: .15rem; }
.og-fact > span { font-size: .75rem; color: #6B7280; }
.og-fact > strong { font-size: 1.2rem; }
.og-limit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .25rem 1.5rem; }
.og-limit-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed rgba(29, 29, 27, 0.1); }

/* OMEGATE side panels: forms opened from a button (Modules/Omegate/Resources/views/partials/side_panel.blade.php) */
.og-side-panel { --bs-offcanvas-width: min(32rem, 100vw); }
.og-side-panel .offcanvas-body { padding: 1.25rem; }

/* Phone field country-code list (vue-tel-input): in RTL the flag sits at the right edge, so the list
   must open from there towards the form; the library anchors it left and it ran out of the side panel. */
[dir=rtl] .vti__dropdown-list { left: auto; right: -1px; text-align: right; }
.vti__dropdown-list { max-width: calc(100vw - 2rem); }
