/* כלי ניהול שיעורים במצב עריכה */
.lm-tools {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: 4px;
}

.lm-state {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}

.lm-state.is-locked {
  background: #fdecec;
  color: #c81e2d;
  border-color: rgba(200, 30, 45, 0.3);
}

.lm-state.is-free {
  background: #fff6e0;
  color: #9a6400;
  border-color: rgba(245, 158, 11, 0.4);
}

.lm-state.is-open {
  background: #e9f9ef;
  color: #0d7a3f;
  border-color: rgba(13, 122, 63, 0.3);
}

.lm-state.is-plan {
  background: #eaf4ff;
  color: #003a7d;
  border-color: rgba(0, 58, 125, 0.25);
}

.lm-tools button {
  border: 1px solid rgba(0, 58, 125, 0.22);
  background: #fff;
  color: #003a7d;
  border-radius: 9px;
  width: 26px;
  height: 26px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.lm-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}

.lm-tools button:not(:disabled):hover {
  background: #eaf4ff;
}

.lm-tools .lm-del {
  border-color: rgba(200, 30, 45, 0.28);
  color: #c81e2d;
}

.tree-lesson-add {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px 10px;
}

.tree-add-lesson {
  border: 1px dashed rgba(0, 58, 125, 0.35);
  background: rgba(65, 217, 248, 0.12);
  color: #003a7d;
  border-radius: 12px;
  padding: 6px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tree-add-lesson.is-ghost {
  background: #fff;
}

.tree-add-lesson:hover {
  background: rgba(65, 217, 248, 0.24);
}

.lm-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(6, 20, 44, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lm-modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 60px rgba(6, 20, 44, 0.35);
  text-align: right;
}

.lm-modal-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #003a7d;
}

.lm-x {
  position: absolute;
  inset-inline-start: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #45557a;
}

.lm-form label,
.lm-search {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
  color: #22314f;
}

.lm-form input,
.lm-search input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 58, 125, 0.22);
  border-radius: 12px;
  font: inherit;
}

.lm-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.lm-primary,
.lm-ghost {
  border-radius: 12px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
}

.lm-primary {
  background: #003a7d;
  color: #fff;
}

.lm-ghost {
  background: #fff;
  color: #22314f;
  border-color: rgba(0, 58, 125, 0.22);
}

.lm-pick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 52vh;
  overflow: auto;
}

.lm-pick-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
  border: 1px solid rgba(0, 58, 125, 0.16);
  background: #f7fbff;
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.lm-pick-row:hover {
  background: #e9f4ff;
}

.lm-pick-title {
  font-weight: 800;
  color: #22314f;
}

.lm-pick-where {
  font-size: 12px;
  color: #5a6a8c;
}

.lm-empty {
  margin: 8px 0 0;
  color: #5a6a8c;
  font-size: 13px;
}

/* פס עריכת שיעורים (אמנון בלבד) */
.lm-editbar{display:flex;flex-direction:column;justify-content:center;margin:0 0 8px;position:sticky;top:0;z-index:40;
  padding:6px 0;background:linear-gradient(180deg,rgba(255,255,255,.98) 78%,rgba(255,255,255,0))}
.lm-editbar [data-library-sync-status]{display:block;min-height:16px;text-align:center;color:#53627a;font:700 11px/1.3 "Heebo",sans-serif}
.lm-editbar-btn{width:100%;border:0;border-radius:12px;padding:11px 14px;cursor:pointer;
  font:800 16px/1.2 "Heebo","Noto Sans Hebrew",sans-serif;color:#003a7d;
  background:linear-gradient(180deg,#fbbf24,#f59e0b);box-shadow:0 8px 22px rgba(245,158,11,.45);
  border:2px solid #f59e0b;text-shadow:none;transition:transform .08s,filter .15s,box-shadow .15s}
.lm-editbar-btn.is-on{background:linear-gradient(180deg,#18a558,#0d7a3f);color:#fff;border-color:#0d7a3f;box-shadow:0 8px 22px rgba(13,122,63,.35)}
.lm-editbar-btn:hover{filter:brightness(1.05);transform:translateY(-1px);box-shadow:0 10px 26px rgba(245,158,11,.55)}
.lm-editbar-btn:active{transform:translateY(1px)}

.lm-access-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0;
}

.lm-access-option {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  direction: rtl;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lm-access-option:hover,
.lm-access-option:focus {
  border-color: #3b82f6;
  outline: none;
}

.lm-access-option.is-on {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.lm-access-icon {
  font-size: 1.25em;
  line-height: 1;
}

.lm-access-label {
  font-weight: 600;
}
