
/* APFEL COMMERCE UI V4 */
#apfel-commerce-overlay {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--m-text, #152a44);
  font-family: inherit;
  direction: rtl;
}

#apfel-commerce-overlay * {
  box-sizing: border-box;
}

#apfel-commerce-overlay .apfel-commerce-sheet {
  position: static !important;
  width: 100% !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#apfel-commerce-status {
  font-size: 13px;
  line-height: 1.7;
  min-height: 0;
  margin: 5px 0 12px;
  color: #0e9962;
}

#apfel-commerce-status:empty {
  display: none;
}

#apfel-commerce-status[data-error="true"] {
  color: #cf334a;
}

#apfel-commerce-content {
  --ac-bg: var(--m-surface, #fff);
  --ac-border: var(--m-border, #d9e5f5);
  --ac-primary: var(--m-primary, #2460d2);
  --ac-muted: var(--m-muted, #7588a2);
}

#apfel-commerce-overlay .ac-sales-panel {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--ac-bg);
  border: 1px solid var(--ac-border);
  border-radius: 16px;
  padding: 13px 16px;
  margin: 10px 0 12px;
}

#apfel-commerce-overlay .ac-sales-mark,
#apfel-commerce-overlay .ac-kpi-icon,
#apfel-commerce-overlay .ac-entry-icon {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
}

#apfel-commerce-overlay .ac-sales-mark {
  width: 36px;
  height: 36px;
  background: #e6f7ee;
  color: #179c64;
}

#apfel-commerce-overlay .ac-sales-mark.is-off {
  background: #fff0ec;
  color: #dc5d3d;
}

#apfel-commerce-overlay .ac-sales-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

#apfel-commerce-overlay .ac-sales-copy strong {
  font-size: 15px;
}

#apfel-commerce-overlay .ac-sales-copy small,
#apfel-commerce-overlay .ac-kpi small,
#apfel-commerce-overlay .ac-entry-name small,
#apfel-commerce-overlay .ac-section-head p,
#apfel-commerce-overlay .ac-help {
  color: var(--ac-muted);
  font-size: 12px;
}

#apfel-commerce-overlay .ac-sales-toggle {
  font: inherit;
  font-weight: 700;
  border: 0;
  background: #e8f0ff;
  color: var(--ac-primary);
  padding: 10px 13px;
  border-radius: 11px;
  cursor: pointer;
  flex: none;
}

#apfel-commerce-overlay .ac-sales-toggle.is-off {
  color: #15885a;
  background: #e8f7ee;
}

#apfel-commerce-overlay .ac-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

#apfel-commerce-overlay .ac-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ac-bg);
  border: 1px solid var(--ac-border);
  border-radius: 16px;
  padding: 15px;
}

#apfel-commerce-overlay .ac-kpi-icon,
#apfel-commerce-overlay .ac-entry-icon {
  background: #eef4ff;
  color: var(--ac-primary);
  font-size: 22px;
}

#apfel-commerce-overlay .ac-kpi-icon {
  width: 39px;
  height: 39px;
}

#apfel-commerce-overlay .ac-kpi > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#apfel-commerce-overlay .ac-kpi strong {
  font-size: 21px;
}

#apfel-commerce-overlay .ac-segment {
  display: flex;
  gap: 7px;
  padding: 5px;
  background: var(--ac-bg);
  border: 1px solid var(--ac-border);
  border-radius: 15px;
  margin-bottom: 16px;
}

#apfel-commerce-overlay .ac-segment button {
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  flex: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ac-muted);
  padding: 11px 7px;
  cursor: pointer;
}

#apfel-commerce-overlay .ac-segment button.is-current {
  background: var(--ac-primary);
  color: white;
}

#apfel-commerce-overlay .ac-segment span {
  font-size: 11px;
  margin-inline-start: 5px;
}

#apfel-commerce-overlay .ac-section-head {
  margin: 15px 0 10px;
}

#apfel-commerce-overlay .ac-section-head h3 {
  font-size: 17px;
  margin: 0 0 4px;
}

#apfel-commerce-overlay .ac-section-head p {
  margin: 0;
}

#apfel-commerce-overlay .ac-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

#apfel-commerce-overlay .ac-entry {
  background: var(--ac-bg);
  border: 1px solid var(--ac-border);
  border-radius: 16px;
  padding: 14px;
  min-width: 0;
}

#apfel-commerce-overlay .ac-entry-top,
#apfel-commerce-overlay .ac-entry-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
}

#apfel-commerce-overlay .ac-entry-icon {
  width: 38px;
  height: 38px;
}

#apfel-commerce-overlay .ac-entry-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#apfel-commerce-overlay .ac-entry-name strong {
  font-size: 14px;
}

#apfel-commerce-overlay .ac-state {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
}

#apfel-commerce-overlay .ac-state.is-on {
  background: #e9f8ef;
  color: #18865c;
}

#apfel-commerce-overlay .ac-state.is-off {
  background: #fff1e9;
  color: #ba6541;
}

#apfel-commerce-overlay .ac-entry-bottom {
  justify-content: space-between;
  border-top: 1px solid var(--ac-border);
  margin-top: 13px;
  padding-top: 12px;
}

#apfel-commerce-overlay .ac-price {
  font-size: 18px;
  font-weight: 800;
}

#apfel-commerce-overlay .ac-price small {
  font-size: 11px;
  color: var(--ac-muted);
}

#apfel-commerce-overlay .ac-card-number {
  direction: ltr;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
}

#apfel-commerce-overlay .ac-edit {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  color: var(--ac-primary);
  border: 1px solid var(--ac-border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

#apfel-commerce-overlay .ac-edit-form {
  margin-top: 14px;
  border-top: 1px dashed var(--ac-border);
  padding-top: 14px;
}

#apfel-commerce-overlay .ac-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

#apfel-commerce-overlay .ac-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
}

#apfel-commerce-overlay .ac-fields input:not([type="checkbox"]) {
  width: 100%;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--ac-border);
  border-radius: 10px;
  padding: 11px 12px;
  background: transparent;
  color: inherit;
  outline: none;
}

#apfel-commerce-overlay .ac-fields input:focus {
  border-color: var(--ac-primary);
}

#apfel-commerce-overlay .ac-fields .ac-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 43px;
}

#apfel-commerce-overlay .ac-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--ac-primary);
}

#apfel-commerce-overlay .ac-save {
  font: inherit;
  font-weight: 700;
  color: white;
  background: var(--ac-primary);
  border: 0;
  border-radius: 11px;
  padding: 11px 16px;
  margin-top: 12px;
  cursor: pointer;
}

#apfel-commerce-overlay .ac-save:disabled {
  opacity: .5;
}

#apfel-commerce-overlay .ac-add-panel {
  border: 1px dashed var(--ac-border);
  background: var(--ac-bg);
  border-radius: 16px;
  padding: 0 14px;
  margin: 12px 0;
}

#apfel-commerce-overlay .ac-add-panel summary {
  cursor: pointer;
  padding: 17px 3px;
  font-size: 14px;
  font-weight: 750;
  color: var(--ac-primary);
}

#apfel-commerce-overlay .ac-add-panel summary small {
  font-size: 11px;
  font-weight: 450;
  color: var(--ac-muted);
  margin-inline-start: 8px;
}

#apfel-commerce-overlay .ac-add-panel .ac-edit-form {
  margin: 0 0 14px;
}

#apfel-commerce-overlay .ac-help {
  line-height: 1.8;
  margin: 11px 1px;
}

.ap-admin-tools:not(#apfel-commerce-overlay) > .ap-admin-sales {
  display: none !important;
}

@media (max-width: 760px) {
  #apfel-commerce-overlay .ac-entry-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  #apfel-commerce-overlay .ac-sales-panel {
    padding: 11px;
    gap: 8px;
  }
  #apfel-commerce-overlay .ac-fields {
    grid-template-columns: 1fr;
  }
  #apfel-commerce-overlay .ac-entry {
    padding: 12px;
  }
}
