@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

.ggjf-shell {
  --ggjf-ink: #1f2937;
  --ggjf-muted: #5f6b7a;
  --ggjf-line: #d9dee7;
  --ggjf-accent: #c78d1c;
  --ggjf-accent-deep: #8f5f00;
  --ggjf-card: #ffffff;
  color: var(--ggjf-ink);
  font-family: "Poppins", sans-serif;
  max-width: 1160px;
  margin: 0 auto;
  overflow-x: hidden;
}

.ggjf-card {
  background: var(--ggjf-card);
  border: 1px solid var(--ggjf-line);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(50, 37, 10, 0.08);
}

.ggjf-total-members-card {
  position: relative;
  width: min(100%, 308px);
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid #e9c987;
  border-radius: 24px;
  padding: 22px 24px 24px;
  box-shadow: 0 18px 45px rgba(108, 74, 18, 0.09);
  font-family: "Poppins", sans-serif;
}

.ggjf-total-members-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #e0b64a 0%, #b97900 100%);
}

.ggjf-total-members-label {
  margin: 0 0 10px;
  padding-left: 2px;
  font-size: 14px;
  font-weight: 600;
  color: #5d6d86;
}

.ggjf-total-members-value {
  margin: 0;
  font-size: clamp(38px, 7vw, 52px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1f3658;
}

.ggjf-total-members-help {
  margin: 14px 0 0;
  max-width: 220px;
  font-size: 16px;
  line-height: 1.45;
  color: #5d6d86;
}

.ggjf-section-head h3 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ggjf-section-head p,
.ggjf-note {
  color: var(--ggjf-muted);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ggjf-form {
  display: grid;
  gap: 20px;
}

.ggjf-card {
  padding: 24px;
  margin-bottom: 18px;
}

.ggjf-count-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: end;
  gap: 24px;
}

.ggjf-section-head {
  margin-bottom: 18px;
}

.ggjf-count-card .ggjf-section-head {
  margin-bottom: 0;
}

.ggjf-family-count-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.ggjf-family-count-title {
  color: #1f2937;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.ggjf-family-count-control {
  width: 220px;
  max-width: 100%;
}

.ggjf-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.ggjf-grid:last-child {
  margin-bottom: 0;
}

.ggjf-grid-1 { grid-template-columns: 1fr; }
.ggjf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ggjf-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ggjf-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ggjf-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ggjf-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.ggjf-form label,
.ggjf-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.ggjf-member-grid {
  align-items: start;
}

.ggjf-field {
  min-width: 0;
}

.ggjf-span-2 {
  grid-column: span 2;
}

.ggjf-help {
  color: var(--ggjf-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.ggjf-field-note,
.ggjf-action-note {
  color: #8b96a8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.ggjf-field-note {
  margin-top: -2px;
}

.ggjf-form input,
.ggjf-form select,
.ggjf-form textarea {
  width: 100%;
  border: 1px solid var(--ggjf-line);
  border-radius: 14px;
  min-height: 50px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--ggjf-ink);
  background: #fff;
  box-sizing: border-box;
}

.ggjf-form input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  min-height: 52px;
}

.ggjf-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.ggjf-required {
  color: #c62828;
}

.ggjf-form textarea {
  resize: vertical;
  min-height: 120px;
}

.ggjf-field[data-key="current_address"] textarea {
  min-height: 84px;
}

.ggjf-form input[readonly] {
  background: #f7f7f7;
  color: #4b5563;
}

.ggjf-form input:focus,
.ggjf-form select:focus,
.ggjf-form textarea:focus {
  outline: none;
  border-color: var(--ggjf-accent);
  box-shadow: 0 0 0 4px rgba(199, 141, 28, 0.14);
}

.ggjf-error-field input,
.ggjf-error-field select,
.ggjf-error-field textarea,
.ggjf-form input.ggjf-error-field,
.ggjf-form select.ggjf-error-field,
.ggjf-form textarea.ggjf-error-field {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12);
}

.ggjf-error-field > span,
label.ggjf-error-field > span {
  color: #c62828;
}

.ggjf-radio-group {
  border: 1px solid var(--ggjf-line);
  border-radius: 14px;
  padding: 12px 14px;
}

.ggjf-radio-group legend {
  padding: 0 6px;
}

.ggjf-radio-group label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin-right: 16px;
}

.ggjf-radio-group input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.ggjf-member-card {
  position: relative;
  overflow: hidden;
}

.ggjf-member-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #e7c264 0%, #a36f00 100%);
}

.ggjf-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0 4px 16px;
  margin-top: -8px;
  text-align: center;
}

.ggjf-member-actions {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 10px;
}

.ggjf-shell .ggjf-add-member,
.ggjf-shell .ggjf-remove-member {
  appearance: none;
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.ggjf-shell .ggjf-add-member,
.ggjf-shell button.ggjf-add-member,
.ggjf-shell input[type="button"].ggjf-add-member {
  border: 1px solid #b77a12 !important;
  background: #fff7e6 !important;
  color: #a56a00 !important;
  box-shadow: none !important;
}

.ggjf-shell .ggjf-remove-member,
.ggjf-shell button.ggjf-remove-member,
.ggjf-shell input[type="button"].ggjf-remove-member {
  border: 1px solid #ef4444 !important;
  background: #fff !important;
  color: #ef4444 !important;
  box-shadow: none !important;
}

.ggjf-shell .ggjf-add-member:hover,
.ggjf-shell .ggjf-remove-member:hover,
.ggjf-shell .ggjf-preview-button:hover,
.ggjf-shell .ggjf-submit:hover,
.ggjf-shell .ggjf-edit-button:hover {
  transform: translateY(-1px);
}

.ggjf-shell .ggjf-add-member:hover {
  background: #fff1cf !important;
  border-color: #a56a00 !important;
}

.ggjf-shell .ggjf-remove-member:hover {
  background: #fff5f5 !important;
  border-color: #dc2626 !important;
  color: #dc2626 !important;
}

.ggjf-shell .ggjf-preview-button,
.ggjf-shell .ggjf-edit-button,
.ggjf-shell button.ggjf-preview-button,
.ggjf-shell button.ggjf-edit-button {
  appearance: none;
  border: 1px solid #b77a12 !important;
  background: #fff7e6 !important;
  color: #a56a00 !important;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none !important;
}

.ggjf-shell .ggjf-preview-button:hover,
.ggjf-shell .ggjf-edit-button:hover {
  background: #fff1cf !important;
  border-color: #a56a00 !important;
}

.ggjf-shell .ggjf-preview-button {
  min-width: 180px;
}

.ggjf-section-head-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ggjf-submit {
  appearance: none;
  border: 0;
  background: linear-gradient(135deg, #d19b27 0%, #8f5f00 100%);
  color: #fff;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.ggjf-review {
  background: #fff;
  border: 1px solid var(--ggjf-line);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(50, 37, 10, 0.08);
  padding: 24px;
}

.ggjf-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
}

.ggjf-preview-modal-card {
  width: min(1100px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fffdf8;
  border: 1px solid #e7dcc6;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
  padding: 22px;
}

.ggjf-preview-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.ggjf-preview-modal-head h3 {
  margin: 0 0 6px;
  font-size: 28px;
  color: #18233b;
}

.ggjf-preview-modal-head p {
  margin: 0;
  color: #667188;
  font-size: 14px;
  line-height: 1.6;
}

.ggjf-preview-close {
  border: 1px solid #d7c7a5;
  background: #fff;
  border-radius: 999px;
  min-width: 44px;
  min-height: 44px;
  font-size: 24px;
  line-height: 1;
  color: #6d5c3b;
  cursor: pointer;
}

.ggjf-preview-modal .ggjf-review {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.ggjf-preview-paper {
  background: #fffdf8;
  border: 1px solid #e7d1a8;
  border-radius: 24px;
  overflow: hidden;
}

.ggjf-preview-header {
  border-bottom: 1px solid #e7d1a8;
  background: #fffdf8;
}

.ggjf-preview-header-grid {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 168px;
  gap: 10px;
  align-items: center;
  padding: 14px 16px 0;
}

.ggjf-preview-header-logo-wrap {
  display: flex;
  justify-content: flex-start;
}

.ggjf-preview-header-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.ggjf-preview-header-copy {
  text-align: center;
}

.ggjf-preview-header-mantra {
  margin-bottom: 10px;
  color: #4c57a6;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.ggjf-preview-header-title {
  color: #e0302a;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 700;
}

.ggjf-preview-header-line {
  margin-top: 8px;
  color: #3f4d7f;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
}

.ggjf-preview-header-link {
  color: #3f4d7f;
  text-decoration: underline;
  font-size: 12px;
}

.ggjf-preview-header .ggjf-preview-header-line,
.ggjf-preview-header .ggjf-preview-header-line span,
.ggjf-preview-header .ggjf-preview-header-line a.ggjf-preview-header-link {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

.ggjf-preview-header-sep {
  padding: 0 4px;
}

.ggjf-preview-header-registration {
  align-self: flex-start;
  text-align: right;
  color: #4c57a6;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.ggjf-preview-header-band {
  margin-top: 12px;
  padding: 12px 18px;
  background: #f4252b;
  color: #fff;
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
}

.ggjf-preview-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 18px 10px;
}

.ggjf-preview-summary-card,
.ggjf-preview-field-card {
  background: #fff;
  border: 1px solid #e7d1a8;
  border-radius: 16px;
  padding: 14px 14px 12px;
}

.ggjf-preview-summary-card small,
.ggjf-preview-field-card small {
  display: block;
  margin-bottom: 6px;
  color: #667188;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ggjf-preview-summary-card strong {
  display: block;
  color: #1f2940;
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
}

.ggjf-preview-field-card span {
  display: block;
  color: #1f2940;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ggjf-preview-member-section,
.ggjf-preview-info-section {
  padding: 0 18px 18px;
}

.ggjf-preview-section-title {
  margin: 0 0 12px;
  color: #18233b;
  font-size: 18px;
  font-weight: 700;
}

.ggjf-preview-member-card {
  border: 1px solid #e7d1a8;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.ggjf-preview-member-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: #fff8ea;
  border-bottom: 1px solid #eed9b0;
}

.ggjf-preview-member-ident {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ggjf-preview-member-photo {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid #e7dcc6;
  background: #fff;
  flex: 0 0 auto;
}

.ggjf-preview-member-ident h4 {
  margin: 0 0 4px;
  color: #1f2940;
  font-size: 18px;
  line-height: 1.2;
}

.ggjf-preview-member-ident p {
  margin: 0;
  color: #667188;
  font-size: 14px;
  line-height: 1.5;
}

.ggjf-preview-fields-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #e7d1a8;
  border-left: 1px solid #e7d1a8;
}

.ggjf-preview-fields-grid .ggjf-preview-field-card {
  border-radius: 0;
  border-width: 0 1px 1px 0;
}

.ggjf-preview-fields-grid .ggjf-preview-field-card:nth-child(4n) {
  border-right-width: 0;
}

.ggjf-preview-fields-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ggjf-preview-fields-grid-wide .ggjf-preview-field-card:nth-child(4n) {
  border-right-width: 1px;
}

.ggjf-preview-fields-grid-wide .ggjf-preview-field-card:nth-child(3n) {
  border-right-width: 0;
}

.ggjf-preview-actions {
  padding: 0 18px 18px;
}

.ggjf-preview-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ggjf-preview-info-grid .ggjf-preview-field-card {
  border-radius: 16px;
  border-width: 1px;
}

.ggjf-preview-actions .ggjf-edit-button,
.ggjf-preview-actions .ggjf-submit-pill {
  min-width: 180px;
  min-height: 56px;
  border-radius: 999px;
}

.ggjf-submit-pill {
  border-radius: 999px;
  padding: 14px 24px;
}

.ggjf-review-head {
  margin-bottom: 18px;
}

.ggjf-review-head h3 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #1f2937;
}

.ggjf-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin-bottom: 18px;
}

.ggjf-review-item {
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
}

.ggjf-review-item strong {
  display: block;
  margin-bottom: 4px;
  color: #1f2937;
}

.ggjf-review-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ggjf-review-actions .ggjf-edit-button,
.ggjf-review-actions .ggjf-submit {
  min-width: 170px;
}

.ggjf-submit[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.ggjf-status {
  display: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 600;
}

.ggjf-status.is-success,
.ggjf-status.is-error {
  display: block;
}

.ggjf-status.is-success {
  background: #ebfff2;
  color: #13663a;
  border: 1px solid #b9ebc8;
}

.ggjf-status.is-error {
  background: #fff1f1;
  color: #8a1f1f;
  border: 1px solid #efc3c3;
}

.ggjf-success-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
}

.ggjf-success-popup-card {
  width: min(600px, 100%);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.ggjf-success-popup-image-wrap {
  width: 100%;
}

.ggjf-success-popup-image {
  display: block;
  width: 100%;
  height: auto;
}

.ggjf-success-popup-image-mobile {
  display: none;
}

#ggjf-success-popup-title,
#ggjf-success-popup-message {
  display: none !important;
}

@media (max-width: 767px) {
  .ggjf-success-popup {
    padding: 16px;
  }

  .ggjf-success-popup-card {
    width: min(300px, 100%);
  }

  .ggjf-success-popup-image-desktop {
    display: none;
  }

  .ggjf-success-popup-image-mobile {
    display: block;
  }
}

.is-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .ggjf-grid-4,
  .ggjf-grid-3,
  .ggjf-grid-5,
  .ggjf-grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ggjf-actions {
    justify-content: center;
  }

  .ggjf-section-head-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ggjf-family-count-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ggjf-family-count-control {
    width: 100%;
  }

  .ggjf-count-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ggjf-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .ggjf-grid-4,
  .ggjf-grid-3,
  .ggjf-grid-2,
  .ggjf-grid-5,
  .ggjf-grid-6 {
    grid-template-columns: 1fr;
  }

  .ggjf-review-grid {
    grid-template-columns: 1fr;
  }

  .ggjf-preview-summary-grid,
  .ggjf-preview-fields-grid,
  .ggjf-preview-fields-grid-wide,
  .ggjf-preview-info-grid {
    grid-template-columns: 1fr;
  }

  .ggjf-preview-header-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ggjf-preview-header-logo-wrap {
    justify-content: center;
  }

  .ggjf-preview-header-registration {
    text-align: center;
  }


  .ggjf-preview-fields-grid .ggjf-preview-field-card,
  .ggjf-preview-fields-grid-wide .ggjf-preview-field-card {
    border-right-width: 0;
  }

  .ggjf-preview-member-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .ggjf-card,
  .ggjf-card {
    padding: 18px;
    border-radius: 18px;
  }

  .ggjf-section-head h3 {
    font-size: 22px;
  }

  .ggjf-section-head p,
  .ggjf-note {
    font-size: 14px;
    line-height: 1.5;
  }

  .ggjf-form {
    gap: 16px;
  }

  .ggjf-grid {
    gap: 14px;
    margin-bottom: 14px;
  }

  .ggjf-form label,
  .ggjf-radio-group {
    gap: 6px;
    font-size: 14px;
  }

  .ggjf-form input,
  .ggjf-form select,
  .ggjf-form textarea {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .ggjf-actions,
  .ggjf-review-actions {
    gap: 10px;
  }

  .ggjf-member-actions {
    justify-content: stretch;
    margin: -2px 0 8px;
  }

  .ggjf-member-actions .ggjf-add-member,
  .ggjf-actions .ggjf-preview-button,
  .ggjf-review-actions .ggjf-edit-button,
  .ggjf-review-actions .ggjf-submit {
    width: 100%;
  }

  .ggjf-shell .ggjf-add-member,
  .ggjf-shell .ggjf-preview-button,
  .ggjf-shell .ggjf-edit-button,
  .ggjf-submit {
    min-height: 48px;
  }

  .ggjf-field[data-key="member_image"] input[type="file"] {
    min-height: auto;
    padding: 10px 0;
  }

  .ggjf-preview-modal {
    padding: 12px;
  }

  .ggjf-preview-modal-card {
    padding: 16px;
    border-radius: 20px;
  }
}

@media (max-width: 520px) {
  .ggjf-total-members-card {
    width: 100%;
  }

  .ggjf-card {
    padding: 16px;
    border-radius: 16px;
  }

  .ggjf-count-card {
    gap: 14px;
  }

  .ggjf-family-count-control {
    width: 100%;
  }

  .ggjf-shell {
    max-width: 100%;
  }
}
