  :root {
  --modal-backdrop-color: rgba(var(--color-black), 0.6);
  --modal-background: rgba(var(--color-white), 1);
  --modal-radius: 0;
  --modal-max-width: 542px;
  --modal-padding: 30px;
  --modal-title-color: rgb(var(--color-near-black));
  --modal-body-color: rgb(var(--color-near-black));
  --modal-border-color: rgb(var(--color-light-gray));
  --modal-shadow: var(--box-shadow-panel);
  --modal-transition: 0.18s ease-out;
  --modal-z-index: 10002;
  --modal-focus-ring: 0 0 0 2px rgba(var(--color-dark-blue), 1);
}

/* Legacy page-shell when not inside docs (e.g. standalone use) */
.cgh-page-shell:not(.cgh-docs-content) {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.cgh-form {
  display: grid;
  gap: 1rem;
}

/* Ensure [hidden] template content is not shown (class display can override it) */
.cgh-form[hidden],
[hidden].cgh-form {
  display: none !important;
}

.cgh-form-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.cgh-form-field span {
  font-weight: 500;
}

.cgh-form-field input,
.cgh-form-field textarea {
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  font: inherit;
}

.cgh-form-field input:focus-visible,
.cgh-form-field textarea:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: var(--modal-focus-ring);
}

.cgh-form-actions {
  display: flex;
  justify-content: flex-end;
}

body.cgh-modal-open {
  overflow: hidden;
}

.cgh-mc-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--modal-backdrop-color);
  z-index: var(--modal-z-index);
}

.cgh-mc-modal.cgh-is-active {
  display: flex;
}

.cgh-mc-modal__dialog {
  background: var(--modal-background);
  width: 100%;
  max-width: var(--modal-max-width);
  max-height: 90vh;
  border-radius: var(--modal-radius);
  box-shadow: var(--modal-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity var(--modal-transition), transform var(--modal-transition);
  outline: none;
}

.cgh-mc-modal.cgh-is-active .cgh-mc-modal__dialog {
  opacity: 1;
  transform: translateY(0);
  border: 1px solid #dbdbdc;
}

.cgh-mc-modal__header,
.cgh-mc-modal__footer {
  padding: var(--modal-padding);
  /* border-bottom: 1px solid var(--modal-border-color); */
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.cgh-mc-modal__header{
  padding-bottom: 0 !important;
  padding-top: 22px !important;
}
.cgh-mc-modal__footer {

  border-top: 1px solid var(--modal-border-color);
  border-bottom: none;
  background-color: var(--modal-background);
  padding: 12px !important;
}

.cgh-mc-modal__title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--modal-title-color);
}

.cgh-mc-modal__body {
  padding:0 var(--modal-padding) 0;
  color: var(--modal-body-color);
  overflow: auto;
}

.cgh-mc-modal__close {
  border: none;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
}

.cgh-mc-modal__close:focus-visible {
  outline: none;
  box-shadow: var(--modal-focus-ring);
}

.cgh-mc-modal__body.cgh-is-loading {
  position: relative;
  min-height: 4rem;
}

.cgh-mc-modal__body.cgh-is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  animation: cgh-mc-modal-spin 0.7s linear infinite;
}

.cgh-modal-error {
  color: #b91c1c;
  font-size: 0.9rem;
}
.gh-form .sf-fieldWrp{
  margin-bottom: 0 !important;
}
.share-recipients-wrapper, .share-recipients-extra {
    display: flex;
    gap: 1rem;
    width: 100%;
    flex-direction: column;
}
.share-recipients-extra:empty {
  display: none;
}
@keyframes cgh-mc-modal-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .cgh-mc-modal__dialog {
    max-width: 100%;
  }

  .cgh-mc-modal {
    padding: 1rem;
  }
}
