/* =========================================================================
   progress-sync.css — styling for the Progress export/import widget.
   Reuses the course colour variables (--panel, --line, --teal, --blue, --r…)
   with graceful fallbacks. RTL-aware, bilingual (.Lar / .he handled globally
   by present.css). Mounts inside #dd-progress-sync.
   ========================================================================= */

#dd-progress-sync { margin: 26px 0; }

#dd-progress-sync .ds-card {
  background: var(--panel, #241F50);
  border: 1px solid var(--line, rgba(255, 255, 255, .10));
  border-radius: var(--r, 18px);
  padding: 22px;
  box-shadow: var(--shadow, 0 16px 44px -18px rgba(0, 0, 0, .65));
  color: #EEEDFB;
}

#dd-progress-sync .ds-head { margin-bottom: 14px; }
#dd-progress-sync .ds-title {
  font-weight: 900;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
#dd-progress-sync .ds-sub {
  color: var(--muted, #9694C0);
  font-size: .9rem;
  margin-top: 6px;
  line-height: 1.6;
}

/* ---- stats row ---- */
#dd-progress-sync .ds-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
}
#dd-progress-sync .ds-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--muted, #9694C0);
  background: var(--bg-2, #1D1A42);
  border: 1px solid var(--line, rgba(255, 255, 255, .10));
  padding: 6px 12px;
  border-radius: 999px;
}
#dd-progress-sync .ds-stat b {
  color: #EEEDFB;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

/* ---- sections ---- */
#dd-progress-sync .ds-sec {
  border-top: 1px solid var(--line, rgba(255, 255, 255, .10));
  padding-top: 16px;
  margin-top: 16px;
}
#dd-progress-sync .ds-h {
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
#dd-progress-sync .ds-note {
  color: var(--muted, #9694C0);
  font-size: .85rem;
  line-height: 1.6;
  margin: 6px 0 12px;
}

/* ---- textareas ---- */
#dd-progress-sync .ds-ta {
  width: 100%;
  resize: vertical;
  min-height: 66px;
  background: var(--bg, #14122C);
  color: #EEEDFB;
  border: 1px solid var(--line, rgba(255, 255, 255, .12));
  border-radius: 12px;
  padding: 12px 14px;
  font-size: .82rem;
  line-height: 1.5;
  word-break: break-all;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#dd-progress-sync .ds-ta.mono {
  font-family: "JetBrains Mono", monospace;
  direction: ltr;
  unicode-bidi: embed;
  text-align: left;
}
#dd-progress-sync .ds-ta:focus {
  border-color: var(--teal, #22D3B0);
  box-shadow: 0 0 0 3px rgba(34, 211, 176, .18);
}

/* ---- buttons ---- */
#dd-progress-sync .ds-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
#dd-progress-sync .ds-btn {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: .86rem;
  color: #EEEDFB;
  background: var(--panel-2, #2F2A62);
  border: 1px solid var(--line, rgba(255, 255, 255, .12));
  border-radius: 999px;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .12s ease, filter .15s ease, background .15s ease;
}
#dd-progress-sync .ds-btn:hover { transform: translateY(-1px); filter: brightness(1.12); }
#dd-progress-sync .ds-btn:active { transform: translateY(0); }
#dd-progress-sync .ds-btn:focus-visible {
  outline: 2px solid var(--blue, #5B8DEF);
  outline-offset: 2px;
}
#dd-progress-sync .ds-btn.primary {
  color: #04231D;
  background: linear-gradient(135deg, var(--teal, #22D3B0), var(--blue, #5B8DEF));
  border-color: transparent;
}

/* hidden native file input (triggered by its <label>) */
#dd-progress-sync .ds-file {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* the Hebrew-only extra label on the Load button ("· ייבוא") */
html[data-lang="ar"] #dd-progress-sync .ds-he-extra { display: none; }

/* ---- result panel ---- */
#dd-progress-sync .ds-result {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: .9rem;
  line-height: 1.6;
}
#dd-progress-sync .ds-result.good {
  background: rgba(34, 211, 176, .12);
  border: 1px solid rgba(34, 211, 176, .35);
  color: #C9F7EC;
}
#dd-progress-sync .ds-result.bad {
  background: rgba(255, 107, 107, .12);
  border: 1px solid rgba(255, 107, 107, .35);
  color: #FFD6D6;
}
#dd-progress-sync .ds-result b { color: #fff; font-family: "JetBrains Mono", monospace; }
#dd-progress-sync .ds-skip { color: var(--muted, #9694C0); font-size: .85em; }

@media (max-width: 480px) {
  #dd-progress-sync .ds-card { padding: 18px; }
  #dd-progress-sync .ds-btn { flex: 1 1 auto; justify-content: center; }
}
