@charset "utf-8";

/* ========================================================
//  MARK: Base settings
// ======================================================== */

/* Page basics
---------------------------------------------------------*/
:root {
  --color-elem-bg: #fff;
  --color-elem-border: #575757;
  --color-disabled-txt: #999;
  --color-disabled-bg: #e8e7e7;
  --color-placeholder-txt: #8d8d8d;
  --color-must: #b02a37;
  --color-error-txt: #dc3545;
  --color-caution: #dc6d35;
  --color-error-area: #dc354545;
  --color-usual-blue: #0060a1;
}

/* Utilities
---------------------------------------------------------*/

/* Text layouts */
.noWrap {
  white-space: nowrap;
}

/* Texts */
.mark-asterisk {
  /* display: inline-block; */
  display: block;
  padding-left: 1em;
  text-indent: -1em;
}
.mark-asterisk::before {
  content: '※';
}
a[target="_blank"]:not(:has(img))::after {
  content: '';
  display: inline-block;
  width: .75em;
  height: .75em;
  -webkit-mask: url('../images/icon-opn_nu_win.svg');
  mask: url('../images/icon-opn_nu_win.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  background-color: currentColor;
  margin-left: .25em;
}
.caution {
  color: var(--color-caution) !important;
  font-weight: 500 !important;
}


/* ========================================================
//  MARK: Form stylings
// ======================================================== */

/* Commons */
:where(button, label:not(.itemGroup), select, [type="submit"]) {
  cursor: pointer;
}
:where(:disabled) {
  cursor: not-allowed;
}

/* Fonts */
.itemGroup-head .mainTtl {
  font-size: 1rem;
}
#form-confirm .itemGroup-head .mainTtl {
  font-weight: 600;
  color: var(--color-usual-blue);
}
.itemGroup-head .sideMark {
  display: inline-block;
  border-radius: 2px;
  font-size: .675rem;
  font-weight: 500;
  color: #fff;
  line-height: 1;
  padding: 4px 7px 5px 6px;
  flex-shrink: 0;
}
.itemGroup-head .sideMark.mark-normal {
  background-color: var(--color-placeholder-txt);
}
.itemGroup-head .sideMark.mark-must {
  background-color: var(--color-must);
}
.itemGroup-head .sideMark.mark-preMust {
  background-color: #ff9c07;
}
.itemGroup-body:has(*[name*="Addr"]) .elem-txt {
  font-size: var(--fontSize-xSmall);
}
.itemGroup-body:has(*[name*="Addr"]) .elem-txt > em {
  color: var(--color-must);
  font-weight: 600;
}
.placeholder {
  font-size: var(--fontSize-Small);
  font-weight: 400;
  color: var(--color-placeholder-txt);
}
.errMsg,
#errMsg-postalCode {
  display: flex;
  align-items: center;
  font-size: var(--fontSize-Medium);
  font-weight: 500;
  color: var(--color-error-txt);
  text-align: left;
}
.errMsg:not([hidden])::before,
#errMsg-postalCode:not([hidden])::before {
  content: '';
  display: block;
  background: url('../images/icon-ng.svg') no-repeat center / contain;
  width: 1.35em;
  height: 1.35em;
  margin-right: .15em;
}
#link-return {
  font-style: var(--fontSize-xSmall);
  text-decoration: underline;
}
#form-thanks > *,
#form-error > * {
  font-size: var(--fontSize-Medium);
}
#form-thanks ul > li {
  padding-left: 1.125em;
  text-indent: -1.125em;
}
#form-thanks ul > li::before {
  content: '●';
  margin-right: .125em;
}
#form-thanks a,
#form-error a {
  display: block;
  width: fit-content;
  font-size: var(--fontSize-xMedium);
  color: var(--color-usual-blue);
  text-decoration: underline;
  text-align: center;
  margin: 2em auto 0;
}
.notes-att_files {
  font-size: .85rem;
  color: #0d6efd;
  line-height: 1.45;
  margin-top: 15px;
  margin-bottom: 5px;
}
.notes-att_files span {
  font-weight: bold;
}
.notes-att_files a {
  text-decoration: underline;
  color: #d114ff;
  margin: 0 5px;
}
.notes-att_files .notes-other {
  color: #141414;
  font-weight: bold;
}
#form-confirm a {
  color: rgb(26, 128, 229);
  text-decoration: underline;
}

/* Layouts */
.form-inner {
  padding-top: 2em;
}
.itemGroup {
  display: grid;
  gap: 5px;
  padding: 1em 15px;
}
.itemGroup:nth-child(2n) {
  background-color: #f9f9f9;
}
.itemGroup-head {
  display: flex;
  align-items: center;
  gap: 5px;
}
.itemGroup-body {
  display: block;
}
.itemGroup-body:has(*[name*="Addr"]) > *:not(:last-child) {
  margin-bottom: 5px;
}
.itemGroup-body:has(*[name*="Addr"]) > label:first-of-type {
  display: block;
}
#form-confirm .itemGroup-body {
  padding-left: 1em;
  padding-right: 1em;
}
.elemGroupWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 12px;
}
.elemGroup:has(input[type="checkbox"]),
.elemGroup:has(input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  border: 1px dashed var(--color-elem-border);
  border-radius: 7px;
  padding: 7px;
  background-color: var(--color-elem-bg);
  color: currentColor;
}
.elemGroup:has(input[type="checkbox"]:checked),
.elemGroup:has(input[type="radio"]:checked) {
  background-color: var(--color-elem-border);
  color: #fff;
}
.elemGroupWrap > *:has(input[type="text"]) {
  width: 100%;
}
.bottomArea {
  margin-top: 2em;
}
.formButtons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
#form-thanks {
  padding: 2em 1em 0;
}
#form-thanks > *:not(:last-child),
#form-error > *:not(:last-child) {
  margin-bottom: 1em;
}
.partsGroup:has(.btn-convertAddr) {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
}
@media (min-width: 576px) {
  .elemGroupWrap:has(*[name*="Addr"]) {
    align-items: flex-end;
  }
  .elemGroupWrap > *:has(input[type="text"]) {
    width: 50%;
  }
}
@media (min-width: 768px) {
  .itemGroup {
    grid-template-columns: 15rem auto;
  }
  .itemGroup-head {
    /* align-self: self-start; */
  }
}
fieldset.form-inner-parts {
  border: none;
  border-top: 3px solid;
}
fieldset.form-inner-parts:not(:last-of-type) {
  margin-bottom: 20px;
}
fieldset.form-inner-parts:nth-of-type(1) {
  border-color: #e06506;
}
fieldset.form-inner-parts:nth-of-type(2) {
  border-color: #2c54c3;
}
fieldset.form-inner-parts > legend {
  background-color: var(--color-elem-bg);
  font-size: var(--fontSize-xMedium);
  font-weight: 500;
  padding: 0 1em;
  margin: 0 auto 1.25em;
}
fieldset.form-inner-parts:nth-of-type(1) > legend {
  color: #e06506;
}
fieldset.form-inner-parts:nth-of-type(2) > legend {
  color: #2c54c3;
}

/* Elements - Common */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), textarea, select) {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  border: 1px solid var(--color-elem-border);
  border-radius: 3px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .035);
  background-color: var(--color-elem-bg);
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--fontSize-Default);
  font-weight: 500;
  padding: 10px;
}
:where(textarea) {
  min-height: 150px;
  word-break: break-all;
}
input[type="checkbox"],
input[type="radio"] {
  display: block;
  width: 1.5em;
  height: 1.5em;
  border: 2px solid var(--color-elem-border);
  box-shadow: none;
  cursor: pointer;
  position: relative;
}
*[aria-invalid="true"] {
  background-color: var(--color-error-area);
  border: 2px solid var(--color-error-txt);
}
input[name="yourPostalCode"] {
  max-width: 12rem;
}

/* Elements - input(type:file) */
.attachmentArea {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.attachmentArea:not(:first-of-type) {
  display: none;
}
.attachmentArea[hidden] {
  opacity: 0;
  transform: translateY(-10px);
}
.attachmentArea:not(:first-of-type) {
  margin-top: 10px;
}
#desc-attachment_files {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-error-txt);
  line-height: 1.3;
  margin-bottom: 10px;
}
input[type="file"] {
  display: none;
}
.btn-fileUpload {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
  background-color: #e06506;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-size: var(--fontSize-xSmall);
  font-weight: 500;
  text-decoration: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-fileUpload::before {
  content: '';
  display: block;
  width: 1.75em;
  height: 1.75em;
  background: url('../images/icon-zip_folder.svg') no-repeat center / contain;
}
@media (any-hover: hover) {
  .btn-fileUpload:hover {
    background-color: #c55506;
  }
}
.file-info:not([hidden]) {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  font-size: var(--fontSize-Medium);
  font-weight: 600;
  color: #198754;
}
.file-info:not([hidden])::before {
  content: '';
  display: block;
  flex-shrink: 0;
  background: url('../images/icon-ok.svg') no-repeat center / contain;
  width: 1.35em;
  height: 1.35em;
  margin-right: .25em;
}
.btn-fileClear {
  flex-shrink: 0;
  color: #b10b0b;
  text-decoration: underline;
  white-space: nowrap;
  margin-left: .25em;
}
.btn-fileClear::before {
  content: '×';
  font-size: 1em;
}
@media (any-hover: hover) {
  .btn-fileClear:hover {
    text-decoration: none;
  }
}

/* Elements - input(type:checkbox) */
input[type="checkbox"] {
  border-radius: 2px;
}
input[type="checkbox"]:checked {
  background-color: var(--color-usual-blue);
}
input[type="checkbox"]:checked::before {
  content: '';
  width: .55em;
  height: 1.125em;
  border-right: 3px solid;
  border-bottom: 3px solid;
  border-color: #fff;
  position: absolute;
  top: 50%;
  left: 0.35em;
  transform: translateY(-70%) rotate(45deg);
}

/* Elements - input(type:radio) */
input[type="radio"] {
  border-radius: 50%;
}
input[type="radio"]:checked {
  background-color: #fff;
}
input[type="radio"]:checked::before {
  content: '';
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background-color: var(--color-usual-blue);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Elements - select */
.selectWrap {
  display: block;
  width: 100%;
  max-width: 14rem;
  position: relative;
}
.selectWrap::after {
  pointer-events: none;
  content: '';
  display: block;
  width: 1em;
  height: .75em;
  clip-path: polygon(100% 0, 0 0, 50% 100%);
  background-color: currentColor;
  position: absolute;
  top: 50%;
  right: .75rem;
  transform: translateY(-50%);
}
select:has(option:checked[value=""]) {
  color: var(--color-disabled-txt);
}

/* Elements - Button(submit,etc) */
.actionBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 250px;
  height: 3rem;
  border: 1px solid currentColor;
  font-size: var(--fontSize-xMedium);
  font-weight: 500;
  text-align: center;
  line-height: 1;
}
.actionBtn[name="back"] {
  width: fit-content;
  margin: 0 15px;
  border: none;
  background: no-repeat;
  font-size: calc(var(--fontSize-Medium) * 1.125);
  color: rgb(20, 20, 20);
  text-decoration: underline;
}
.actionBtn[name="send"] {
  background-color: #e9681d;
  color: #fff;
  transition: filter .3s ease-in-out;
}
#btn-confirm:disabled {
  background-color: var(--color-disabled-bg);
  color: var(--color-disabled-txt);
}
#btn-confirm:not(:disabled) {
  background-color: var(--color-usual-blue);
  font-weight: 600;
  color: #fff;
}
#form-confirm #btn-confirm:not(:disabled) {
  background-color: #e06506;
}
@media (any-hover: hover) {
  #form-confirm #btn-confirm:not(:disabled):hover {
    filter: contrast(1.25);
  }
}
@media (min-width: 768px) and (any-hover: hover) {
  .actionBtn[name="back"]:hover {
    text-decoration: none;
  }
  .actionBtn[name="send"]:hover {
    filter: contrast(1.25);
  }
}

/* Bottom area */
.consentArea {
  margin-bottom: 1.25em;
}
.consentArea p {
  font-size: var(--fontSize-xSmall);
  text-align: center;
  margin-bottom: .5em;
}
.consentArea p a {
  text-decoration: underline;
  color: var(--color-usual-blue);
}
.consentArea .elemGroup {
  justify-content: center;
  margin: auto;
}

/* ========================================================
//  MARK: Others
// ======================================================== */

/* When invalid occurred (After error message appears) */
.global-error-msg {
  color: #cc3033;
  background-color: #fde8e8;
  border: 1px solid #f6caca;
  border-radius: 4px;
  padding: 15px 20px;
  margin: 30px auto;
  text-align: center;
  font-weight: bold;
  line-height: 1.6;
}
.global-error-msg[hidden] {
  display: none !important;
}
/*
.err-highlight {
  background-color: #cc303345;
  border: 2px solid #cc3033;
}
*/
.itemGroup-body:has(:not(.group-reqdElem)) .errMsg:not([hidden]) + input,
.itemGroup-body:has(:not(.group-reqdElem)) .errMsg:not([hidden]) + .selectWrap > select,
.itemGroup-body:has(:not(.group-reqdElem)) .errMsg:not([hidden]) + textarea,
.itemGroup-body:has(.errMsg:not([hidden])) .group-reqdElem,
.elemGroup:has(.errMsg:not([hidden])) input:not([name="externalUpload"]) {
  background-color: #cc303345;
  border: 2px solid #cc3033;
  border-radius: 3px;
}
.attachmentArea:has(.errMsg:not([hidden])) {
  background-color: #cc303345;
  border: 2px solid #cc3033;
  border-radius: 3px;
}

/* Except form styles */
#form-section {
  max-width: 777px;
  margin-left: auto;
  margin-right: auto;
}
.section-headings {
  margin-bottom: 2em;
}
.section-headings .main-title {
  font-size: var(--fontSize-xxLarge);
  font-weight: 600;
  text-align: center;
  margin-bottom: 1em;
}
.section-headings .notes {
  text-align: center;
}
.section-headings .notes .txt-red {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  width: fit-content;
  background-color: #fde8e8;
  border: 1px solid #f6caca;
  border-radius: 4px;
  font-size: var(--wp--preset--font-size--xx-medium);
  color: var(--color-must);
  font-weight: bold;
  text-align: left;
  line-height: 1.25em;
  padding: 15px 20px;
  margin: 0 auto .5em;
}
.section-headings .notes .txt-red::before {
  content: '';
  display: block;
  width: 1.25em;
  height: 1.25em; /* Same as Parent's line-height */
  background: url('../images/icon-caution.svg') no-repeat center center / contain;
}
.section-headings .notes.mark-asterisk {
  width: fit-content;
  font-size: var(--fontSize-xSmall);
  text-align: left;
  margin: auto;
}
.section-headings .notes.thanks {
  display: block;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  font-size: var(--wp--preset--font-size--xxx-medium);
  font-weight: 600;
  color: #155724;
  text-align: center;
  padding: 20px;
  margin-bottom: 25px;
}

/* Progress bar */
:root {
  --progBar-item-height: 2.5rem;
}
.progressBar {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}
.progBar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% / 3);
  height: var(--progBar-item-height);
  background-color: var(--color-disabled-bg);
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1;
  color: var(--color-disabled-txt);
}
.progBar-item:not(:last-of-type) {
  position: relative;
  padding-right: 1.25rem;
}
.progBar-item:not(:last-of-type)::after {
  content: '';
  display: block;
  height: calc(100% + 2px);
  width: 1.25rem;
  background-color: var(--color-elem-bg);
  clip-path: polygon(100% 0, 100% 50%, 100% 100%, 0% 100%, 95% 50%, 0% 0%);
  position: absolute;
  top: 50%;
  bottom: 0;
  right: -1px;
  transform: translateY(-50%);
}
.progBar-item > span {
  display: block;
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 1.125em;
  padding-left: calc(1.125em + 3px);
}
.progBar-item:nth-of-type(1) > span {
  background-image: url('../images/icon-input_pen_gray.svg');
}
.progBar-item:nth-of-type(2) > span {
  background-image: url('../images/icon-check_gray.svg');
}
.progBar-item:nth-of-type(3) > span {
  background-image: url('../images/icon-send_gray.svg');
}
.progBar-item > img {
  width: 1.125em;
  height: 1.125em;
}
.progBar-item.active {
  /* background-color: var(--color-usual-blue); */
  color: #fff;
  background: linear-gradient(to bottom, #4585b4 0%, #006ba9 10%, #004b7e 90%, #4585b4 100%);
  text-shadow: 0px 0px 1em #004b7e;
}
.progBar-item.active:nth-of-type(1) > span {
  background-image: url('../images/icon-input_pen_white.svg');
}
.progBar-item.active:nth-of-type(2) > span {
  background-image: url('../images/icon-check_white.svg');
}
.progBar-item.active:nth-of-type(3) > span {
  background-image: url('../images/icon-send_white.svg');
}
@media (min-width: 576px) {
  .progBar-item {
    font-size: .875rem;
  }
}

/* Word counter */
.wordCounter {
  font-size: var(--fontSize-xSmall);
  font-weight: 400;
  text-align: right;
  line-height: 1;
  opacity: .95;
  margin-top: 5px;
}
.wordCounter > .langthTxt {
  color: #198754;
  margin: 0 .125em;
}

/* Transfer zip code to address */
#btn-convertAddr {
  display: grid;
  place-items: center;
  width: 6rem; /* For when seeking is working */
  border: none;
  background-color: #e06506;
  border-radius: 2px;
  padding: 6px 5px 6px;
  flex-shrink: 0;
}
.disabled-js #btn-convertAddr {
  display: none;
  visibility: hidden;
}
@media (min-width: 768px) and (any-hover: hover) {
  #btn-convertAddr:hover {
    opacity: .7;
  }
}
#btn-convertAddr > .initial {
  font-size: var(--fontSize-Small);
  color: #fff;
  line-height: 1;
}
#btn-convertAddr > .seeking {
  display: none;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-bottom-color: #fff;
  border-radius: 50%;
  animation: loadSpin 1s ease infinite;
}
@keyframes loadSpin {
  0% {
    transform: rotate(0turn);
  }
  100% {
    transform: rotate(1turn);
  }
}

/* Loading while file checking */
.loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none; /* Initially hidden */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loadingOverlay.active { display: flex; }
.loadingOverlay .loadingBox {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 30px rgba(0,0,0,.08);
}
.loadingOverlay .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #e5e5e5;
  border-top-color: var(--color-usual-blue);
  border-radius: 50%;
  /* Use "Zip code Seeking" */
  animation: loadSpin 1s linear infinite;
}
.loadingOverlay .message {
  font-size: var(--fontSize-xMedium);
  font-weight: 600;
  color: #333;
}