/* Save-flow модалка отмены подписки и unbind-guard. */

.sf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  transition: opacity 0.18s ease;
  padding: 16px;
  overflow-y: auto;
}
.sf-overlay.visible { opacity: 1; }

.sf-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  width: 100%;
  max-width: 440px;
  padding: 22px 24px 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
}
.sf-modal-wide { max-width: 540px; }

.sf-header { margin-bottom: 14px; }
.sf-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}
.sf-subject {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.sf-body {
  font-size: 14px;
  line-height: 1.5;
  color: #1e293b;
}
.sf-body p { margin: 0 0 12px; }
.sf-body p:last-child { margin-bottom: 0; }

.sf-prompt { margin-bottom: 10px; }

.sf-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.sf-reason {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.sf-reason:hover { border-color: #94a3b8; background: #f8fafc; }
.sf-reason input[type=radio] { margin: 0; }
.sf-reason span { flex: 1; font-size: 14px; }

.sf-offer {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 4px 0 8px;
}
.sf-offer-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: #075985;
}
.sf-offer-body {
  font-size: 14px;
  line-height: 1.5;
  color: #0c4a6e;
}
.sf-offer-body b { color: #0369a1; }

.sf-warning {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
}
.sf-warning-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: #9a3412;
}
.sf-warning-body {
  font-size: 13px;
  line-height: 1.5;
  color: #7c2d12;
}
.sf-warning-body b { color: #9a3412; }

.sf-subjects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 12px;
}
.sf-subject-pick {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.sf-subject-pick:hover { border-color: #0369a1; background: #f0f9ff; }
.sf-subject-pick:active { background: #e0f2fe; }
@media (max-width: 480px) {
  .sf-subjects { grid-template-columns: 1fr; }
}

.sf-sub-list {
  margin: 6px 0 12px 18px;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
}
.sf-sub-list li { margin-bottom: 4px; }

.sf-error {
  margin: 8px 0;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: 13px;
}

.sf-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  flex-wrap: wrap;
}

.sf-btn {
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
  font-family: inherit;
}
.sf-btn:disabled { opacity: 0.5; cursor: wait; }
.sf-btn-primary {
  background: #0284c7;
  color: #fff;
  border-color: #0284c7;
}
.sf-btn-primary:hover:not(:disabled) { background: #0369a1; border-color: #0369a1; }
.sf-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #e2e8f0;
}
.sf-btn-secondary:hover:not(:disabled) { background: #e2e8f0; }
.sf-btn-danger {
  background: #fff;
  color: #b91c1c;
  border-color: #fecaca;
}
.sf-btn-danger:hover:not(:disabled) { background: #fef2f2; border-color: #fca5a5; }
.sf-btn-tertiary {
  background: transparent;
  color: #0f766e;
  border-color: transparent;
  text-decoration: underline;
  padding-left: 4px;
  padding-right: 4px;
}
.sf-btn-tertiary:hover:not(:disabled) { color: #134e4a; background: transparent; }

.sf-spin {
  display: inline-block;
  margin-top: 10px;
  font-size: 16px;
  color: #64748b;
}
