.ocmosa-wrap { max-width: 1400px; }
.ocmosa-title { font-size: 26px; margin: 16px 0 6px; }
.ocmosa-subtitle { color: #64748b; margin-bottom: 18px; }

.ocmosa-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ocmosa-card{
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.ocmosa-card--wide{ grid-column: 1 / -1; }
.ocmosa-card--filters{ grid-column: 1 / 2; }
.ocmosa-card--kpis{ grid-column: 2 / 3; display: flex; align-items: stretch; }

.ocmosa-card__header{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.ocmosa-card__header h2{
  margin:0;
  font-size: 16px;
}
.ocmosa-muted{ color:#64748b; font-size: 12px; }

/* --- Chart containers --- */
.ocmosa-chart {
  position: relative;
  width: 100%;
}

/* Default card charts (Pie/Bar) */
.ocmosa-card .ocmosa-chart {
  height: 320px;          /* נוח לעין */
}

/* Wide chart (line) */
.ocmosa-card--wide .ocmosa-chart {
  height: 280px;          /* פחות גבוה כדי לא "למרוח" */
}

/* Ensure canvas fills the wrapper */
.ocmosa-chart canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.ocmosa-brand-card{
    display:flex;
    gap:16px;
    align-items:center;
    padding:14px 16px;
    background:#fff;
    border:1px solid #e7e7e7;
    border-radius:14px;
    box-shadow:0 2px 10px rgba(0,0,0,0.04);
    margin:10px 0 18px;
}

.ocmosa-brand-logo{
    display:flex;
    align-items:center;
    justify-content:center;
    width:72px;
    height:72px;
    border-radius:14px;
    border:1px solid #f0f0f0;
    background:#fafafa;
    overflow:hidden;
    flex:0 0 72px;
}

.ocmosa-brand-logo img{
    width:100%;
    height:100%;
    object-fit:contain;
    padding:10px;
}

.ocmosa-brand-content{
    flex:1;
    min-width:0;
}

.ocmosa-brand-title{
    font-size:14px;
    font-weight:700;
    color:#1d2327;
    margin-bottom:4px;
}

.ocmosa-brand-text{
    font-size:13px;
    line-height:1.5;
    color:#50575e;
    margin-bottom:6px;
}

.ocmosa-brand-links{
    display:flex;
    gap:10px;
    align-items:center;
}

.ocmosa-brand-link{
    font-size:13px;
    text-decoration:none;
    color:#2271b1;
    font-weight:600;
}

.ocmosa-brand-link:hover{
    text-decoration:underline;
}



.ocmosa-filters .ocmosa-field{ margin-bottom: 12px; }
.ocmosa-field label{
  display:block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #0f172a;
}

.ocmosa-row{ display:flex; align-items:center; gap:10px; }
.ocmosa-sep{ color:#94a3b8; }

.ocmosa-actions{
  display:flex;
  gap: 10px;
  margin-top: 12px;
}

.ocmosa-hint{
  margin-top: 10px;
  color:#64748b;
  font-size: 12px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
  padding: 10px;
}

.ocmosa-statuses{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ocmosa-pill{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
}
.ocmosa-pill input{ margin:0; }

.ocmosa-kpis{
  display:grid;
  width:100%;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ocmosa-kpi{
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.ocmosa-kpi__label{ color:#64748b; font-size: 12px; margin-bottom: 4px; }
.ocmosa-kpi__value{ font-size: 18px; font-weight: 800; color:#0f172a; }

.ocmosa-table-wrap{ overflow:auto; }
.ocmosa-table th{ white-space: nowrap; }
.ocmosa-empty{
  text-align:center;
  padding: 18px !important;
  color:#64748b;
}

.ocmosa-footer-note{
  margin-top: 10px;
  color:#64748b;
  font-size: 12px;
}

.ocmosa-settings-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 1100px){
  .ocmosa-grid{ grid-template-columns: 1fr; }
  .ocmosa-card--filters, .ocmosa-card--kpis{ grid-column: 1 / -1; }
  .ocmosa-settings-grid{ grid-template-columns: 1fr; }
}

/* ============================================
 * RTL adjustments
 * Loaded automatically by WordPress on RTL sites
 * ============================================ */

.ocmosa-wrap{
  direction: rtl;
  text-align: right;
}

.ocmosa-wrap,
.ocmosa-wrap input,
.ocmosa-wrap button,
.ocmosa-wrap select,
.ocmosa-wrap textarea{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Heebo",
               "Assistant", "Rubik", "Open Sans Hebrew", Arial, sans-serif;
}

/* Tabular numerics: keep digits LTR inside RTL context so currency,
 * percentages and large numbers render correctly. */
.ocmosa-kpi__value,
.ocmosa-table td:nth-child(2),
.ocmosa-table td:nth-child(3),
.ocmosa-table td:nth-child(4),
.ocmosa-table td:nth-child(5){
  direction: ltr;
  text-align: right;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

/* The first column of the table holds the source name (could be a
 * mixed-script string like "Source: google.com"). Keep it RTL-aligned
 * but isolate so URLs/Latin words inside don't break the layout. */
.ocmosa-table td:first-child{
  text-align: right;
  unicode-bidi: isolate;
}

.ocmosa-table th{
  text-align: right;
}

/* Date inputs: keep their internal layout LTR (the browser's native
 * date picker is LTR), but align them to the right within their row. */
.ocmosa-row input[type="date"]{
  direction: ltr;
  text-align: right;
}

/* Date input native picker indicator stays on the right edge in RTL. */
input[type="date"]::-webkit-calendar-picker-indicator{
  margin-inline-start: 0;
  margin-inline-end: 0;
}

/* Pills: flip the inner gap direction so checkbox sits to the right
 * of the label in Hebrew. flex-direction handles this with row-reverse. */
.ocmosa-pill{
  flex-direction: row-reverse;
}

/* Empty-state message stays centered (already centered in base CSS). */

/* Brand card: logo on the right, content on the left in RTL. */
.ocmosa-brand-card{
  flex-direction: row-reverse;
}

/* Card header: keep the title on the right, the muted helper on the left. */
.ocmosa-card__header{
  flex-direction: row-reverse;
}
