/* Local font files (paths match app/globals.css public assets) */
@font-face {
  font-family: 'NotoSansJP';
  src: url('/assets/font/noto/NotoSansJP-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSansJP';
  src: url('/assets/font/noto/NotoSansJP-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSansJP';
  src: url('/assets/font/noto/NotoSansJP-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NotoSansJP';
  src: url('/assets/font/noto/NotoSansJP-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'InterLocal';
  src: url('/assets/font/inter/Inter_18pt-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'InterLocal';
  src: url('/assets/font/inter/Inter_18pt-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'InterLocal';
  src: url('/assets/font/inter/Inter_18pt-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'InterLocal';
  src: url('/assets/font/inter/Inter_18pt-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Default English; use html[lang="ja"] on the document for Japanese */
.form-wrapper,
.form-inner-wrapper,
.newformstyle,
.frm-wrapper,
.legacy-v2-form,
.mip-v3-form {
  font-family: 'InterLocal', system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

html[lang="ja"] .form-wrapper,
html[lang="ja"] .form-inner-wrapper,
html[lang="ja"] .newformstyle,
html[lang="ja"] .frm-wrapper,
html[lang="ja"] .legacy-v2-form,
html[lang="ja"] .mip-v3-form {
  font-family: 'NotoSansJP', 'Noto Sans JP', system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.mip-v3-form input,
.mip-v3-form select,
.mip-v3-form textarea,
.form-inner-wrapper input,
.form-inner-wrapper select,
.form-inner-wrapper textarea,
.legacy-v2-form input,
.legacy-v2-form select,
.legacy-v2-form textarea {
  font-family: 'InterLocal', system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

html[lang="ja"] .mip-v3-form input,
html[lang="ja"] .mip-v3-form select,
html[lang="ja"] .mip-v3-form textarea,
html[lang="ja"] .form-inner-wrapper input,
html[lang="ja"] .form-inner-wrapper select,
html[lang="ja"] .form-inner-wrapper textarea,
html[lang="ja"] .legacy-v2-form input,
html[lang="ja"] .legacy-v2-form select,
html[lang="ja"] .legacy-v2-form textarea {
  font-family: 'NotoSansJP', 'Noto Sans JP', system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Form wrapper styles from preview.scss - matches original form page design */
.form-wrapper {
  width: 100%;
  max-width: 917px;
  margin: 20px auto;
  border: 20px solid #DCE6F2;
}

.form-wrapper .mailmag_basicinfo_title01 {
  width: 100%;
  background-color: #979696;
  color: white;
  padding: 10px;
  font-size: 18px;
  text-align: center;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.form-wrapper .mip-v3-form {
  padding: 25px;
}

.form-inner-wrapper {
  background-color: #ffffff;
}

@media only screen and (max-width: 992px) {
  .form-wrapper {
    width: 90%;
    border: 15px solid #DCE6F2;
    margin-top: 25px;
  }

  .form-wrapper .mip-v3-form {
    padding: 15px;
  }
}

/* Legacy public form runtime styles (version != 3)
   Scoped to .legacy-v2-form to avoid leaking globally */

.legacy-v2-form {
  border-radius: 10px;
  padding: 24px;
}

/* Common field styling */
.legacy-v2-form label {
  font-weight: 600;
  color: #606f7b;
  display: inline-block;
  margin-bottom: 6px;
}

.legacy-v2-form input[type="text"],
.legacy-v2-form input[type="email"],
.legacy-v2-form input[type="number"],
.legacy-v2-form input[type="password"],
.legacy-v2-form input[type="date"],
.legacy-v2-form input[type="file"],
.legacy-v2-form select,
.legacy-v2-form textarea {
  width: 100%;
  max-width: 100%;
  display: block;
  padding: 6px 12px;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.legacy-v2-form .form-group {
  margin-bottom: 16px;
}

/* Two-column support when .mip-item wrappers exist (migrated legacy-v2 or v3-in-legacy shell) */
.legacy-v2-form .mip-v3-form,
.legacy-v2-form:has(> .mip-item) {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: flex-start;
  gap: 16px 2%;
  box-sizing: border-box;
  width: 100%;
}

.legacy-v2-form .mip-item {
  box-sizing: border-box;
  display: block;
  flex: 1 1 48%;
  max-width: 49%;
  min-width: 0;
  width: auto;
}

.legacy-v2-form .mip-item.half-width {
  flex: 1 1 48%;
  max-width: 49%;
}

.legacy-v2-form .mip-item.full-width {
  flex: 1 1 100%;
  max-width: 100%;
  width: 100%;
}

/* Builder v3 class names (renamed from half-width/full-width) — outer legacy-v2-form scope.
   Mirrors `#formcolourid .mip-v3-form .{class}` rules, scoped to the outer legacy form. */


.legacy-v2-form .colomtwo {
  flex: 1 1 48% !important;
  max-width: 49% !important;
}

.legacy-v2-form .wdth-dragfrm {
  flex: 1 1 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

#formcolourid .legacy-v2-form .colomtwo {
  flex: 1 1 48% !important;
  max-width: 49% !important;
}

#formcolourid .legacy-v2-form .wdth-dragfrm {
  flex: 1 1 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Responsive: allow mobile override; runtime may inject width rules based on hidden layoutMobile */
@media (max-width: 640px) {
  .legacy-v2-form .mip-item {
    width: 100%;
  }

  .legacy-v2-form .colomtwo,
  .legacy-v2-form .wdth-dragfrm {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Buttons – default: centered block in field areas */
.legacy-v2-form .dfltbt {
  text-align: center;
  margin-top: 16px;
}

/*  cross check form-b
.legacy-v2-form .mip-item button,
.legacy-v2-form button,
.legacy-v2-form input[type="button"],
.legacy-v2-form input[type="submit"] {
  display: flex;
  margin: 0 auto;
}
*/

/* Cancel + submit on one row (same as dynamic form / form_btn_wrapper) */
.legacy-v2-form .dfltbt {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.legacy-v2-form .dfltbt button,
.legacy-v2-form .dfltbt input[type="button"],
.legacy-v2-form .dfltbt input[type="submit"] {
  display: inline-block !important;
  margin: 0 !important;
}

/* Support rows of multiple buttons centered with spacing */
.legacy-v2-form .mip-button-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.legacy-v2-form .btn_mailmag_basicinfo02,
.legacy-v2-form button.newbtnfrm,
.legacy-v2-form button,
.legacy-v2-form input[type="submit"],
.legacy-v2-form #btnFormCreate,
.legacy-v2-form button[type="submit"] {
  background-color: #42b095 !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: 10px 15px !important;
  /* box-shadow: 0 4px 0 rgba(0, 0, 0, .15); */
  cursor: pointer;
}

/* Button wrapper styles from API route - override inline styles */
.form_btn_wrapper {
  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-top: 20px !important;
  margin-bottom: 20px !important;
  width: 100% !important;
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Input field styles - apply globally for form-inner-wrapper */
.form-inner-wrapper input[type="text"],
.form-inner-wrapper input[type="email"],
.form-inner-wrapper input[type="number"],
.form-inner-wrapper input[type="password"],
.form-inner-wrapper input[type="date"],
.form-inner-wrapper input[type="file"],
.form-inner-wrapper select,
.form-inner-wrapper textarea {
  width: 100%;
  max-width: 100%;
  display: block;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
}

.form-inner-wrapper label {
  font-weight: 600;
  color: #606f7b;
  display: inline-block;
}

.frm-wrapper .mip-item .mulclas {
  margin-bottom: 16px;
}

/* v9+ embed: block field body + inline-block .mip-item columns (no flex grid — avoids width overflow) */
.form-inner-wrapper .mip-v3-form {
  display: block;
  box-sizing: border-box;
  max-width: 100%;
}

.form-inner-wrapper .mip-v3-form>.form_btn_wrapper,
.form-inner-wrapper .mip-v3-form>.mip-v3-button-wrapper,
.form-inner-wrapper .mip-v3-form>.dfltbt,
.form-inner-wrapper .mip-v3-form>.embed-inline-actions {
  display: block;
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  clear: both;
}

.form-inner-wrapper .mip-v3-form .mip-item {
  box-sizing: border-box;
  vertical-align: top;
}

.form-inner-wrapper .mip-v3-form .mip-item.half-width,
.form-inner-wrapper .mip-v3-form .mip-item.colomtwo {
  display: inline-block;
  width: 49%;
  max-width: 49%;
  min-width: 0;
}

.form-inner-wrapper .mip-v3-form .mip-item.full-width {
  display: block;
  width: 100%;
  max-width: 100%;
}

.form-inner-wrapper .mip-v3-form .wdth-dragfrm,
.form-inner-wrapper .mip-v3-form .wdth-drag {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Button positioning - ensure buttons are centered and properly styled */
.form-inner-wrapper .form_btn_wrapper {
  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-top: 20px !important;
  margin-bottom: 20px !important;
  position: relative !important;
  width: 100% !important;
  bottom: auto !important;
  right: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.form-inner-wrapper .form_btn_wrapper button,
.form-inner-wrapper .form_btn_wrapper input[type="submit"],
.form-inner-wrapper .form_btn_wrapper input[type="button"] {
  margin: 0 !important;
  display: inline-block !important;
}

/* Ensure buttons inside form_btn_wrapper display horizontally */
.form_btn_wrapper .form-group {
  display: inline-block !important;
  margin: 0 !important;
  width: auto !important;
}

.form_btn_wrapper .form-group>div {
  display: inline-block !important;
}

/* Override any button wrapper divs that might be causing stacking */
.form_btn_wrapper>div {
  display: inline-block !important;
  margin: 0 !important;
}

/* btnFormCreateCB: show inside form control area (form_btn_wrapper), centered */
.form_btn_wrapper .mip-v3-button-wrapper,
.form-inner-wrapper .form_btn_wrapper .mip-v3-button-wrapper {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin: 0 !important;
}


/* Responsive for inputs */
@media (max-width: 640px) {
  .form-inner-wrapper .mip-v3-form .mip-item.half-width,
  .form-inner-wrapper .mip-v3-form .mip-item.colomtwo {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Success message above title (copy/embed form submit) - no alert, centre-aligned */
#dynamicFormSuccessBanner {
  color: green !important;
  text-align: center !important;
  padding: 12px 16px !important;
  margin-bottom: 12px !important;
  font-weight: 600 !important;
  width: 100%;
  box-sizing: border-box;
}

/* Additional styles from page.jsx inline CSS */
.text_label {
  display: none !important;
}

/* Duplicate form title: keep h1 gray bar, hide leftover PHP label.strip */
#formcolourid:has(> h1.mailmag_basicinfo_title01) > div > label.text_label,
#formcolourid:has(> h1.mailmag_basicinfo_title01) > div:has(> label.text_label) {
  display: none !important;
}

/* Cancel/submit arrow badges (direct form parity; embed uses legacy-form.css only) */
.newfa-aro {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: 8px !important;
  width: 19px !important;
  height: 19px !important;
  background-color: #ffffff !important;
  color: #42b095 !important;
  border-radius: 50% !important;
  font-size: 13px !important;
  font-weight: bold !important;
}

.newfa-aro.newarolft {
  margin-left: 0 !important;
  margin-right: 8px !important;
}

.droppable .tools {
  display: none !important;
}

.linebreakdrag label {
  display: none !important;
}

.invalid {
  border-color: red !important;
}

.error-message {
  color: red;
  font-size: 12px;
  margin-top: 5px;
}

.disablefrm,
.embed-confirm-disabled-field {
  opacity: 90% !important;
  color: #111010 !important;
  box-shadow: inherit !important;
  border: none !important;
  outline: none !important;
  background: none !important;
  background-color: inherit !important;
  background-image: inherit !important;
  pointer-events: none;
}

#formcolourid .disablefrm,
#formcolourid .embed-confirm-disabled-field,
.mip-v3-form .disablefrm,
.mip-v3-form .embed-confirm-disabled-field {
  opacity: 90% !important;
  color: #111010 !important;
  box-shadow: inherit !important;
  border: none !important;
  outline: none !important;
  background: none !important;
  background-color: inherit !important;
  background-image: inherit !important;
}

input.disablefrm:-internal-autofill-selected,
input.embed-confirm-disabled-field:-internal-autofill-selected {
  background: none !important;
  background-color: inherit !important;
  background-image: inherit !important;
}

/* Keep radio/checkbox visible on confirm even with .disablefrm border reset */
input[type="radio"].disablefrm,
input[type="radio"].embed-confirm-disabled-field,
input[type="checkbox"].disablefrm,
input[type="checkbox"].embed-confirm-disabled-field {
  border: 2px solid #dbdbdb !important;
  background-color: #FFFFFF !important;
  opacity: 1 !important;
}

/* Confirm step: LINE button stays visible but non-clickable */
button.line-app-btn.disablefrm,
button.line-app-btn.embed-confirm-disabled-field,
.mip-v3-form button.line-app-btn.disablefrm,
#formcolourid button.line-app-btn.disablefrm {
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.9 !important;
  background: #dbdbdb !important;
  background-color: #dbdbdb !important;
  color: #fff !important;
  border: none !important;
  outline: none !important;
}

button.line-app-btn.disablefrm:hover,
button.line-app-btn.disablefrm:active,
button.line-app-btn.embed-confirm-disabled-field:hover,
button.line-app-btn.embed-confirm-disabled-field:active {
  background: #dbdbdb !important;
  background-color: #dbdbdb !important;
  opacity: 0.9 !important;
}

/* Confirm step: disabled <select> — hide border, muted chevron (matches disabled radio gray) */
.mip-v3-form select.disablefrm,
.mip-v3-form select.embed-confirm-disabled-field,
.legacy-v2-form select.disablefrm,
.legacy-v2-form select.embed-confirm-disabled-field,
.form-inner-wrapper select.disablefrm,
.form-inner-wrapper select.embed-confirm-disabled-field,
#formcolourid select.disablefrm,
#formcolourid select.embed-confirm-disabled-field {
  border: none !important;
  outline: none !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23dbdbdb' d='M6 8L0 0h12z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 10px 6px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-right: 32px !important;
}

.dfltbt.dfltbtnone {
  display: none !important;
}

/* LP confirm step: Back/Confirm live in #lpConfirmPanel (outside .mip-v3-form); hide default button row */
form:has(#lpConfirmPanel) .dfltbt {
  display: none !important;
}

.mip-v3-form>#lpConfirmPanel {
  display: none !important;
}

#formcolourid>#lpConfirmPanel,
#formcolourid #lpConfirmPanel,
#formcolourid form #lpConfirmPanel,
#formcolourid>#sectionConfirmButtons,
#formcolourid #sectionConfirmButtons,
#formcolourid form #sectionConfirmButtons {
  width: 100%;
  box-sizing: border-box;
}

#formcolourid>#confirm-panel-mount,
#formcolourid #confirm-panel-mount,
#formcolourid form #confirm-panel-mount {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* LP template/wizard preview: legacy .form_btn_wrapper or v3 .mip-v3-button-wrapper */
.lp-wizard-preview-root #formcolourid .form_btn_wrapper,
.lp-wizard-preview-root #formcolourid .mip-v3-button-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
  padding: 25px 0;
}

/* Embed confirm: Back/Confirm inside the form card (legacy PHP keeps fields in .row.form-body) */
#formcolourid>#embedConfirmPanel,
.legacy-v2-form>#embedConfirmPanel,
#sectionDynamicFormShow #embedConfirmPanel {
  width: 100%;
  padding: 25px 0;
  box-sizing: border-box;
  display: block !important;
}

#formcolourid>#embedConfirmPanel .embed-confirm-actions,
.legacy-v2-form>#embedConfirmPanel .embed-confirm-actions,
#sectionDynamicFormShow #embedConfirmPanel .embed-confirm-actions,
#formcolourid>#sectionConfirmButtons .embed-confirm-actions,
.legacy-v2-form>#sectionConfirmButtons .embed-confirm-actions,
#sectionDynamicFormShow #sectionConfirmButtons .embed-confirm-actions {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  padding: 25px 0;
}

/* Embed: cancel + submit centered inside .mip-v3-form (overrides field flex space-between) */
.embed-inline-actions,
#sectionDynamicFormShow .mip-v3-form>.embed-inline-actions,
.form-inner-wrapper .mip-v3-form>.embed-inline-actions {
  display: flex !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  padding: 25px 0 !important;
  box-sizing: border-box !important;
}

.embed-inline-actions .btn_mailmag_basicinfo02,
.embed-inline-actions button,
.embed-inline-actions input[type="button"],
.embed-inline-actions input[type="submit"],
#sectionDynamicFormShow .mip-v3-button-wrapper .btn_mailmag_basicinfo02,
#sectionDynamicFormShow .mip-v3-button-wrapper button,
.form-inner-wrapper .mip-v3-button-wrapper .btn_mailmag_basicinfo02,
.form-inner-wrapper .mip-v3-button-wrapper button,
#sectionDynamicFormShow .dfltbt .btn_mailmag_basicinfo02,
#sectionDynamicFormShow .dfltbt button,
.form-inner-wrapper .dfltbt .btn_mailmag_basicinfo02,
.form-inner-wrapper .dfltbt button {
  width: auto !important;
  min-width: 140px !important;
  max-width: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

#sectionDynamicFormShow .mip-v3-form>.form_btn_wrapper,
#sectionDynamicFormShow .mip-v3-form>.mip-v3-button-wrapper,
#sectionDynamicFormShow .mip-v3-form>.dfltbt,
.form-inner-wrapper .mip-v3-form>.form_btn_wrapper,
.form-inner-wrapper .mip-v3-form>.mip-v3-button-wrapper,
.form-inner-wrapper .mip-v3-form>.dfltbt {
  width: 100% !important;
  max-width: 100% !important;
  clear: both;
}

/* Center default submit area; keep cancel + submit on one line (embed without .legacy-v2-form wrapper) */
.dfltbt {
  text-align: center;
  margin: 25px auto;
  display: flex;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.dfltbt button,
.dfltbt input[type="button"],
.dfltbt input[type="submit"] {
  display: inline-block !important;
  margin: 0 !important;
}

.btn_mailmag_basicinfo02,
.newbtnfrm {
  padding: 5px !important;
  background-color: rgb(66, 176, 149) !important;
  color: white !important;
  border: 2px solid #fff !important;
  box-shadow: 4px 4px 1px 0px rgb(176 176 176) !important;
  cursor: pointer !important;
  min-width: 135px !important;
  width: 135px !important;
  min-height: 40px !important;
  font-size: 14px !important;
  margin: 0px !important;
}

/* Button styles for form buttons */
.form-inner-wrapper .btn_mailmag_basicinfo02,
.form-inner-wrapper button,
.form-inner-wrapper input[type="submit"],
.form-inner-wrapper input[type="button"],
.form-inner-wrapper .newbtnfrm {
  padding: 5px !important;
  background-color: rgb(66, 176, 149) !important;
  color: white !important;
  cursor: pointer;
  min-width: 140px;
  max-width: 250px;
  min-height: 40px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 4px;
}

.legacy-v2-form .line-app-btn {
  border: none !important;
  font-size: 17px !important;
  background: #06C755 !important;
  color: #fff !important;
  padding: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 5px !important;
  letter-spacing: 1px !important;
  font-weight: 700 !important;
  outline: none !important;
  position: relative !important;
  transition: all 0.3s !important;
  overflow: hidden !important;
  -webkit-border-radius: 5px !important;
  width: 100%;
  height: 40px !important;
  justify-content: start !important;
  max-width: 100% !important;
}

#sectionConfirmButtons {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1000;
}

#sectionConfirmButtons.confirm-step-visible,
#sectionConfirmButtons[style*="display: block"],
#sectionConfirmButtons[style*="display:block"] {
  display: flex !important;
}

/* Direct view: hide creation submit row while confirm Back/Confirm panel is visible */
#formcolourid:has(#sectionConfirmButtons.confirm-step-visible) .form_btn_wrapper,
#formcolourid:has(#sectionConfirmButtons.confirm-step-visible) .mip-v3-button-wrapper,
#formcolourid:has(#sectionConfirmButtons.confirm-step-visible) .dfltbt,
.form-inner-wrapper:has(#sectionConfirmButtons.confirm-step-visible) .form_btn_wrapper,
.form-inner-wrapper:has(#sectionConfirmButtons.confirm-step-visible) .mip-v3-button-wrapper {
  display: none !important;
}

/* Hide button row until embed chrome normalization finishes (slow API load) */
#sectionDynamicFormShow.embed-form-loading .mip-v3-button-wrapper,
#sectionDynamicFormShow.embed-form-loading .form_btn_wrapper,
#sectionDynamicFormShow.embed-form-loading .dfltbt,
#sectionDynamicFormShow.embed-form-loading .embed-inline-actions {
  visibility: hidden !important;
}

.mip-v3-button-wrapper>#sectionConfirmButtons:not(.confirm-step-visible):not(.confirm-panel),
.mip-v3-form>#sectionConfirmButtons:not(.confirm-step-visible):not(.confirm-panel) {
  display: none !important;
}

.mip-v3-form>#sectionConfirmButtons.confirm-step-visible,
.mip-v3-form>#sectionConfirmButtons.confirm-panel {
  display: flex !important;
}

#sectionConfirmButtons #btnBack,
#sectionConfirmButtons #btnConfirm {
  min-width: 130px !important;
  min-height: 40px !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
}


/* Lp form styles */

#formcolourid {
  max-width: 880px;
  margin-left: auto !important;
  margin-right: auto !important;
  border: 20px solid #DCE6F2;
  padding: 0 !important;
}

/* LP goal 37/38/57: hide form card; goal renders in sibling #lp-goal-react-mount */
#formcolourid[data-lp-goal-active="1"] {
  display: none !important;
}

@media (min-width: 320px) and (max-width: 596px) {
  .mip-v3-button-wrapper {
    gap: 10px;
  }

  #formcolourid .mip-v3-form {
    padding: 15px !important;
  }
  #formcolourid h1.mailmag_basicinfo_title01{
    font-size: 16px !important;
  }

  #formcolourid {
    border: 10px solid #DCE6F2;
  }
}

.frm-wrapper .mip-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: flex-start;
  gap: 16px 2%;
}

.frm-wrapper .mip-form .mip-item {
  box-sizing: border-box;
  display: block;
  flex: 1 1 48%;
  max-width: 49%;
  min-width: 0;
  width: auto;
}

.frm-wrapper .mip-form .mip-item.half-width {
  flex: 1 1 48%;
  max-width: 49%;
}

.frm-wrapper .mip-form .mip-item.full-width {
  flex: 1 1 100%;
  max-width: 100%;
  width: 100%;
}

.frm-wrapper .mip-form .mulclas>p {
  display: inline-block;
  margin: 0;
  padding: 5px 15px 0px 0px;
}


.frm-wrapper .mip-item .line-app-btn .line-app-logo {
  width: 40px !important;
  height: auto !important;
  border-right: 1px solid rgba(0, 0, 0, 0.0901960784) !important;
  padding: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 10px;
}

.frm-wrapper .mip-item .line-app-btn {
  border: none !important;
  font-size: 17px !important;
  background: #06C755 !important;
  color: #fff !important;
  padding: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 5px !important;
  letter-spacing: 1px !important;
  font-weight: 700 !important;
  outline: none !important;
  position: relative !important;
  transition: all 0.3s !important;
  overflow: hidden !important;
  -webkit-border-radius: 5px !important;
  max-width: 100% !important;
  width: 100%;
  min-height: 38px !important;
  justify-content: start !important;
}

.frm-wrapper .mip-item .line-app-btn p {
  margin: 0px !important;
}

.frm-wrapper .mip-item .spacer-element {
  border: none !important;
}

/* copy form styles */

.newformstyle .mailmag_basicinfo_title01 {
  background-color: #979696;
  color: white;
  margin: 0px !important;
  padding: 10px;
  font-size: 18px !important;
  font-weight: 500 !important;
  text-align: center !important;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.newformstyle .mip-item .mulclas>p {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 5px 15px 0px 0px;
}


.newformstyle .mip-v3-form {
  padding: 25px;
  box-sizing: border-box;
  max-width: 100%;
}

.newformstyle .mip-v3-form .mip-item .line-app-btn .line-app-logo {
  width: 36px !important;
  height: auto !important;
  border-right: 1px solid rgba(0, 0, 0, 0.0901960784) !important;
  padding: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 10px;
}

.newformstyle .mip-v3-form .mip-item .line-app-btn {
  border: none !important;
  font-size: 17px !important;
  background: #06C755 !important;
  color: #fff !important;
  padding: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 5px !important;
  letter-spacing: 1px !important;
  font-weight: 700 !important;
  outline: none !important;
  position: relative !important;
  transition: all 0.3s !important;
  overflow: hidden !important;
  -webkit-border-radius: 5px !important;
  max-width: 100% !important;
  width: 100%;
  max-height: 36px !important;
  min-height: 36px !important;
  justify-content: start !important;
}

.newformstyle .mip-v3-form .mip-item .line-app-btn p {
  margin: 0px !important;
}

.newformstyle .mip-v3-form .mip-item .spacer-element {
  border: none !important;
}

input[type="checkbox"].checkin.newfrmcheckbox {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #C3C3C3;
  border-radius: 4px;
  background-color: #FFFFFF;
  display: inline-grid !important;
  place-content: center;
  vertical-align: middle;
  cursor: pointer;
  margin: 0 5px 0 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

input[type="checkbox"].checkin.newfrmcheckbox::before {
  content: "";
  width: 10px;
  height: 5px;
  border-left: 2px solid #FFFFFF;
  border-bottom: 2px solid #FFFFFF;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform 0.1s ease-in-out;
  margin-top: -2px;
}

input[type="checkbox"].checkin.newfrmcheckbox:checked,
input[type="checkbox"].checkin.newfrmcheckbox:indeterminate {
  background-color: #138B67;
  border-color: #138B67;
}

input[type="checkbox"].checkin.newfrmcheckbox:disabled {
  border-color: #dbdbdb;
}

input[type="checkbox"].checkin.newfrmcheckbox:checked::before {
  transform: rotate(-45deg) scale(1);
}

input[type="checkbox"].checkin.newfrmcheckbox:indeterminate::before {
  width: 10px;
  height: 2px;
  border: 0;
  border-radius: 1px;
  background-color: #FFFFFF;
  transform: scale(1);
  margin-top: 0;
}

input[type="checkbox"].checkin.newfrmcheckbox:disabled:checked,
input[type="checkbox"].checkin.newfrmcheckbox:disabled:indeterminate {
  background-color: #dbdbdb;
  border-color: #dbdbdb;
}

input[type="checkbox"].checkin.newfrmcheckbox:disabled:checked::before {
  border-left-color: #FFFFFF;
  border-bottom-color: #FFFFFF;
}

input[type="checkbox"].checkin.newfrmcheckbox:disabled:indeterminate::before {
  background-color: #dbdbdb;
}

/* Match app/shared/ui/radio.jsx (UncheckedRadioIcon / CheckedRadioIcon) */
input[type="radio"].checkin.newfrmradio,
input[type="radio"].add-radio.newfrmradio {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #C3C3C3;
  background-color: #FFFFFF;
  display: inline-grid !important;
  place-content: center;
  vertical-align: middle;
  cursor: pointer;
  margin: 0 5px 0 0;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

input[type="radio"].checkin.newfrmradio::after,
input[type="radio"].add-radio.newfrmradio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #138B67;
  transform: scale(0);
  transition: transform 0.1s ease-in-out;
}

input[type="radio"].checkin.newfrmradio:checked,
input[type="radio"].add-radio.newfrmradio:checked {
  border-color: #138B67;
}

input[type="radio"].checkin.newfrmradio:checked::after,
input[type="radio"].add-radio.newfrmradio:checked::after {
  transform: scale(1.2);
}

input[type="radio"].checkin.newfrmradio:disabled,
input[type="radio"].add-radio.newfrmradio:disabled {
  border-color: #dbdbdb;
}

input[type="radio"].checkin.newfrmradio:disabled:checked::after,
input[type="radio"].add-radio.newfrmradio:disabled:checked::after {
  background-color: #dbdbdb;
}

/* Confirm step: form_new.css uses appearance:auto on .disablefrm — keep custom radio/checkbox chrome */
input[type="radio"].newfrmradio.disablefrm,
input[type="checkbox"].newfrmcheckbox.disablefrm {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: #FFFFFF !important;
  opacity: 1 !important;
  pointer-events: none;
  cursor: not-allowed;
}

input[type="radio"].newfrmradio.disablefrm {
  border-color: #dbdbdb;
}

input[type="checkbox"].newfrmcheckbox.disablefrm {
  border-color: #dbdbdb !important;
  background-color: #FFFFFF !important;
}

input[type="checkbox"].disablefrm:checked,
input[type="checkbox"].embed-confirm-disabled-field:checked,
input[type="checkbox"].newfrmcheckbox.disablefrm:checked,
input[type="checkbox"].newfrmcheckbox.disablefrm:indeterminate,
input[type="checkbox"].newfrmcheckbox.embed-confirm-disabled-field:checked,
input[type="checkbox"].newfrmcheckbox.embed-confirm-disabled-field:indeterminate {
  background-color: #dbdbdb !important;
  border-color: #dbdbdb !important;
}

input[type="checkbox"].disablefrm:checked::before,
input[type="checkbox"].embed-confirm-disabled-field:checked::before,
input[type="checkbox"].newfrmcheckbox.disablefrm:checked::before,
input[type="checkbox"].newfrmcheckbox.embed-confirm-disabled-field:checked::before {
  border-left-color: #FFFFFF !important;
  border-bottom-color: #FFFFFF !important;
}

input[type="checkbox"].newfrmcheckbox.disablefrm:indeterminate::before {
  background-color: #dbdbdb !important;
}

input[type="radio"].newfrmradio.disablefrm:checked::after {
  background-color: #dbdbdb !important;
}

/* Runtime form <select>: reset Safari's  */
.mip-v3-form select,
.legacy-v2-form select,
.form-inner-wrapper select,
.mip-form select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  border: 1px solid #D7D7D7 !important;
  font-size: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-height: 36px !important;
  padding: 6px 32px 6px 12px !important;
  line-height: 1.42857143 !important;
  color: #555 !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23555555' d='M6 8L0 0h12z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 10px 6px !important;
}