/* Deactivation Modal Styles */
.krefrm-modal {
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.krefrm-modal.show {
  opacity: 1;
  pointer-events: auto;
}

@keyframes krefrm-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.krefrm-modal-content {
  background-color: white;
  padding: 0;
  border-radius: 8px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25),
    0 0 1px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  animation: krefrm-slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

@keyframes krefrm-slideIn {
  from {
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.krefrm-modal-header {
  background: #ffffff;
  color: #1a1a1a;
  padding: 32px 32px 24px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.krefrm-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.krefrm-modal-subtitle {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #888;
  font-weight: 400;
}

.krefrm-modal-close {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  opacity: 0.7;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.krefrm-modal-close:hover {
  opacity: 1;
  background-color: #f0f0f0;
  color: #333;
}

.krefrm-modal-body {
  padding: 32px;
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
  scroll-behavior: smooth;
}

.krefrm-modal-body > p {
  margin-top: 0;
  margin-bottom: 24px;
  color: #555;
  line-height: 1.6;
  font-size: 14px;
}

/* Form Groups */
.krefrm-form-group {
  margin-bottom: 24px;
}

.krefrm-form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 10px;
  color: #1a1a1a;
  font-size: 14px;
}

.krefrm-form-group label .required {
  color: #dc3545;
  margin-left: 2px;
}

.krefrm-form-group select,
.krefrm-form-group textarea,
.krefrm-form-group input[type="email"],
.krefrm-form-group input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d3d3d3;
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  transition: all 0.2s ease;
  background-color: #fafafa;
}

.krefrm-form-group select:focus,
.krefrm-form-group textarea:focus,
.krefrm-form-group input[type="email"]:focus,
.krefrm-form-group input[type="text"]:focus {
  outline: none;
  border-color: #2271b1;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.krefrm-form-group select {
  background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
  appearance: none;
  cursor: pointer;
}

.krefrm-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.krefrm-input-help {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6b6b6b;
  line-height: 1.5;
}

/* Danger / delete data section */
.krefrm-checkbox-group {
  background: rgba(255, 69, 58, 0.08);
  padding: 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 69, 58, 0.3);
  border-left: 4px solid #dc3232;
}

.krefrm-checkbox-label {
  display: flex;
  align-items: flex-start;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  gap: 10px;
}

.krefrm-checkbox-label input[type="checkbox"] {
  margin-top: 4px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #dc3232;
}

.krefrm-checkbox-label span {
  color: #1e1e1e;
  line-height: 1.5;
  font-size: 14px;
}

.krefrm-checkbox-help {
  font-size: 12px;
  color: #b92c2c;
  font-weight: 500;
}

/* Modal Footer */
.krefrm-modal-footer {
  background: #fafafa;
  padding: 20px 32px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.krefrm-modal-footer .button {
  padding: 10px 26px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #ccd0d4;
  background: #fff;
  color: #32373c;
  transition: all 0.18s ease;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

.krefrm-modal-footer .button:hover {
  background: #f7f7f7;
  border-color: #a6a6a6;
}

.krefrm-modal-footer .button:active {
  transform: translateY(1px);
}

.krefrm-modal-footer .button-primary {
  background: #0073aa;
  color: #fff;
  border-color: #006799;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.krefrm-modal-footer .button-primary:hover {
  background: #006799;
  border-color: #005885;
}

.krefrm-modal-footer .button-primary:active {
  background: #005885;
}

.krefrm-modal-footer .button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 600px) {
  .krefrm-modal-content {
    width: 95%;
    margin: 20% auto;
    max-height: 90vh;
  }

  .krefrm-modal-header {
    padding: 24px 20px 20px;
  }

  .krefrm-modal-header h2 {
    font-size: 20px;
  }

  .krefrm-modal-body {
    padding: 24px 20px;
  }

  .krefrm-modal-footer {
    padding: 16px 20px;
    flex-direction: column-reverse;
    gap: 10px;
  }

  .krefrm-modal-footer .button {
    width: 100%;
  }
}

/* Scrollbar styling */
.krefrm-modal-body::-webkit-scrollbar {
  width: 6px;
}

.krefrm-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.krefrm-modal-body::-webkit-scrollbar-thumb {
  background: #d3d3d3;
  border-radius: 3px;
}

.krefrm-modal-body::-webkit-scrollbar-thumb:hover {
  background: #999;
}
