.cm-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:none;
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
}
.cm-backdrop.show{
  display:flex;
}

.cm-modal{
  width: 95%;
  max-width: 760px;
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  margin: 0 auto; /* без великого відступу зверху, все центрує .cm-backdrop */
}

.cm-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #eee}
.cm-header h3{margin:0;font-size:18px}
.cm-close{background:none;border:0;font-size:28px;line-height:1;cursor:pointer}
.cm-body{padding: 20px 24px;
  overflow-y: auto;
  flex: 1 1 auto;}
.cm-footer{      padding: 26px 24px 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  /*border-top: 1px solid #e5e5e5;*/
  background: #fff;
  flex-shrink: 0;
  position: sticky;
  bottom: -20px;
  /*box-shadow: 0 -4px 12px rgba(0,0,0,0.08);*/}
.cm-btn{padding:10px 14px;border-radius:8px;border:1px solid #ddd;background:#f6f6f6;cursor:pointer}
.cm-btn.primary{background:#1e73be;color:#fff;border-color:#1e73be}
.cm-btn.ghost{background:#fff}
.cm-accord{margin-top:12px}
.cm-acc-btn{width:100%;text-align:left;padding:10px 0;border:0;background:none;border-top:1px solid #eee;font-weight:600;cursor:pointer}
.cm-acc-panel{display:none;padding:8px 0 14px}
.cm-acc-btn[aria-expanded="true"] + .cm-acc-panel{display:block}
.cm-switch{display:flex;gap:10px;align-items:center;margin:8px 0}
.cm-switch input{width:42px;height:22px}
.cm-switch.disabled{opacity:.6;pointer-events:none}
.cm-manage{position:fixed;right:14px;bottom:14px;padding:8px 12px;border-radius:8px;border:1px solid #ddd;background:#fff;z-index:999;opacity:.9}
.cm-provider-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cm-provider {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafafa;
}

.cm-provider-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cm-provider-name {
  font-weight: 600;
  font-size: 14px;
}

.cm-provider-count {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
}

.cm-provider-desc {
  margin: 6px 0 4px;
  font-size: 13px;
  line-height: 1.4;
}

.cm-provider-link {
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hidden {
  display: none !important;
}

/* Контейнер для категорій */
.cm-cat {
  border-top: 1px solid #eee;
  padding: 10px 0 12px;
}

/* Хедер: назва + стрілка + тумблер */
.cm-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Кнопка-заголовок категорії */
.cm-acc-btn {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Стрілочка */
.cm-cat-arrow::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
      top: -5px;
    position: relative;
}

.cm-cat.open .cm-cat-arrow::before {
  transform: rotate(225deg);
  top: 0px;
    position: relative;
}

/* Опис категорії – завжди видно */
.cm-cat-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: #555;
}

/* Панель зі списком провайдерів – ховається/показується */
.cm-acc-panel {
  display: none;
  padding: 8px 0 0;
}

.cm-cat.open .cm-acc-panel {
  display: block;
}

/* Перемикач (тумблер) справа */
.cm-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cm-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cm-switch-toggle {
  width: 40px;
  height: 20px;
  border-radius: 999px;
  background: #d0d0d0;
  position: relative;
  transition: background 0.2s ease;
}

.cm-switch-toggle::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  left: 2px;
  top: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform 0.2s ease;
}

/* Увімкнений стан */
.cm-switch input:checked + .cm-switch-toggle {
  background: #1e73be;
}

.cm-switch input:checked + .cm-switch-toggle::before {
  transform: translateX(20px);
}

/* Вимкнений / неактивний */
.cm-switch.disabled {
  opacity: .6;
  pointer-events: none;
}

#cm-intro a{text-decoration:underline;}
