.installation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.module-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 6, 12, 0.82);
  backdrop-filter: blur(14px);
}

.module-modal {
  width: min(980px, 100%);
  max-height: min(88vh, 920px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: #10141d;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.module-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(120deg, rgba(249, 115, 22, 0.12), transparent 56%);
}

.module-modal-head h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.module-modal-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.module-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 25px;
  line-height: 1;
}

.module-modal-body {
  max-height: calc(88vh - 122px);
  overflow: auto;
  padding: 22px 26px 26px;
}

.module-info {
  margin-bottom: 22px;
  padding: 13px 15px;
  border: 1px solid rgba(249, 115, 22, 0.24);
  border-radius: 13px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.08);
  font-size: 13px;
  line-height: 1.55;
}

.module-category + .module-category {
  margin-top: 24px;
}

.module-category h3 {
  margin: 0 0 10px;
  color: #fb923c;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.module-toggle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.module-toggle-row {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.module-toggle-row:hover {
  border-color: rgba(249, 115, 22, 0.28);
}

.module-always-on {
  opacity: 0.74;
}

.module-copy {
  min-width: 0;
}

.module-copy strong,
.module-copy small {
  display: block;
}

.module-copy strong {
  margin-bottom: 5px;
  font-size: 14px;
}

.module-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.module-switch-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.module-switch-wrap input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.module-switch {
  position: relative;
  width: 44px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: #252b36;
  transition: 0.18s ease;
}

.module-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #cbd5e1;
  content: "";
  transition: 0.18s ease;
}

.module-switch-wrap input:checked + .module-switch {
  border-color: rgba(249, 115, 22, 0.72);
  background: rgba(249, 115, 22, 0.88);
}

.module-switch-wrap input:checked + .module-switch::after {
  transform: translateX(19px);
  background: #111827;
}

.module-switch-wrap input:focus-visible + .module-switch {
  outline: 3px solid rgba(249, 115, 22, 0.24);
  outline-offset: 3px;
}

.module-modal-footer {
  position: sticky;
  bottom: -26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 26px -26px -26px;
  padding: 17px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(16, 20, 29, 0.96);
  backdrop-filter: blur(16px);
}

.module-modal-footer > div {
  display: flex;
  gap: 9px;
}

.module-modal-footer [data-module-message] {
  max-width: 560px;
  font-size: 12px;
  line-height: 1.45;
}

.module-save-success {
  color: #86efac;
}

.module-save-error {
  color: #fca5a5;
}

.module-modal-loading,
.module-modal-error {
  padding: 48px 28px;
  text-align: center;
}

.module-modal-loading .spinner {
  margin-top: 0;
}

.module-modal-loading p,
.module-modal-error p {
  color: var(--muted);
}

@media (max-width: 760px) {
  .module-modal-overlay {
    padding: 10px;
  }

  .module-modal {
    max-height: 95vh;
  }

  .module-modal-body {
    max-height: calc(95vh - 116px);
    padding: 18px;
  }

  .module-modal-head {
    padding: 20px 18px 16px;
  }

  .module-toggle-list {
    grid-template-columns: 1fr;
  }

  .module-modal-footer {
    align-items: stretch;
    flex-direction: column;
    margin: 22px -18px -18px;
    padding: 15px 18px;
  }

  .module-modal-footer > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
