/* ========================================
   RESET CSS
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========================================
   CSS VARIABLES
   ======================================== */
:root { 
  --primary-color: #D7092F;
  --text-color: #333333;
  --border-color: #CCCCCC;
  --background-color: #FFFFFF;
  --error-color: #FF0000;
  --font-family: 'Noto Sans JP', sans-serif;
  --primary-color-hover: #A2001E;
}

/* ========================================
   BASE STYLES
   ======================================== */
body {
  color: var(--text-color);
  background-color: #FAFAFA;
  font-family: var(--font-family);
}

body.loading {
  overflow : hidden;
  transition : opacity 0.3s ease-in-out;
}

input::placeholder, 
textarea::placeholder {
  color: #dfdbdc;
}

textarea,
.form-input.w250,
.pd10-bt {
  font-family: "Noto Sans JP", sans-serif;
}

span.arrow-link a {
    margin-top: 5px;
}

pre {
  font-family: inherit;
  margin: 0px;
}

button.submit-btn {
  font-weight: normal !important;
}

div#hcaptcha-error {
    font-size: 12px;
    color: red;
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */
    .note-text {
        font-size: 14px;
        text-align: right;
        margin-top: 10px;
        margin-right: 35px;
        margin-bottom: -20px;
    }

    /* Fix bullet point alignment on mobile devices */
    .bullet-point-container {
      display: table;
      height: 30px;
      width: 100%;
      line-height: 1;
    }

    .bullet-point-container span {
      display: table-cell;
      vertical-align: middle;
      padding: 0;
      margin: 0;
    }

    .bullet-point-container span:first-child {
      font-size: 18px;
      width: 24px;
      text-align: center;
    }

    .bullet-point-container span:last-child {
      width: calc(100% - 24px);
    }

    /* Special fix for mobile devices */
    @media screen and (max-width: 768px) {
      .bullet-point-container {
        height: 24px;
      }

      .bullet-point-container span:first-child {
        font-size: 16px;
        width: 20px;
      }

      .bullet-point-container span:last-child {
        width: calc(100% - 20px);
      }
    }

.wrapper {
  max-width: 1440px;
  margin: 0 auto;
  background-color: var(--background-color);
}

.container {
  min-height: 744px;
  max-width: 800px;
  margin: 0 auto;
}

.layout-container {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.main-content {
  flex: 1;
}

div#charCount {
    text-align: right;
    font-size: 14px;
}
/* ========================================
   HEADER STYLES
   ======================================== */
.site-header {
  display: flex;
  align-items: center;
  border-bottom: 2px solid #D7092F;
  background-color: var(--background-color);
}

.header-content {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 95%;
  margin: 0 auto;
}

.logo {
  height: 40px;
  margin: 0.25em 0em;
}

#tittle-header {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 25px;
  font-weight: bold;
}

/* ========================================
   STEPS COMPONENT
   ======================================== */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 30px auto;
  max-width: 600px;
  padding: 0 20px;
  gap: 0;
  position: relative;
}

.step {
  position: relative;
  color: #8C8C8C;
  text-align: center;
  flex: 1;
  max-width: 200px;
}

.step::after {
  content: '';
  position: absolute;
  top: 16px;
  right: calc(-50% + 30px);
  width: calc(100% - 60px);
  height: 4px;
  background-color: #F0F0F0;
  z-index: 1;
}

.step:last-child::after {
  display: none;
}

.step.current {
  color: #D7092F;
}

.step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.numbering {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #fff;
  font-size: 12px;
  font-weight: normal;
  position: relative;
  z-index: 2;
}

.step.current .numbering {
  background-color: #D7092F;
  color: #fff;
}

.step-text {
  font-size: 15px;
  white-space: nowrap;
  margin-top: 4px;
}

.step-mobile{
  display: none;
}

/* ========================================
   FORM PANEL
   ======================================== */
.form-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.08), 0 1.5px 4px 0 rgba(0, 0, 0, 0.04);
  padding: 40px 32px;
  margin: 30px 40px;
}

.form-divider {
  border: none;
  height: 1px;
  background-color: #E5E5E5;
  margin: 24px 0;
}

/* ========================================
   FORM LABELS
   ======================================== */
.form-label {
  font-weight: bold;
  font-size: 18px;
}

.form-label-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.form-label-sub {
  width: 60px;
  font-size: 14px;
  color: #666;
  margin-top: 10px;
}

.required-badge {
  background-color: white;
  color: #E60012;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 10px;
  border: 1px solid #E60012;
}

/* ========================================
   FORM ROWS & GROUPS
   ======================================== */
.form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.form-row.has-pd10bt {
  margin-bottom: 0px;
}

.form-row .error {
  width: 100%;
  flex-basis: 100%;
  order: 10;
}

.form-row>div {
  flex: 1;
  width: 100%;
}

.form-row-last {
  margin-bottom: 0;
}

.form-fields {
  width: 100%;
}

.form-group.name-section {
  margin-bottom: 24px;
}

.form-group.address-section {
  margin-bottom: 24px;
}

.form-group.phone-section {
  margin-bottom: 24px;
}

.form-group.email-section {
  margin-bottom: 24px;
}

/* ========================================
   INPUT CONTAINERS
   ======================================== */
.form-row .input-container {
  display: flex;
  align-items: flex-start;
  flex: 1;
  flex-wrap: wrap;
}

.inputs-group {
  display: flex;
  align-items: center;
  width: 100%;
}

.zip-code-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* ========================================
   FORM INPUTS
   ======================================== */
.form-input {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  height: 40px;
}

.form-input.w250 {
  width: 100%;
  font-size: 14px;
  padding: 10px 12px;
  border: 1.5px solid #CCCCCC;
  transition: border-color 0.2s;
  color: black;
}

.form-input.w250:focus {
  border-color: #595959;
  outline: none;
}

.form-input.w500 {
  width: 100%;
}

textarea.form-input {
  line-height: 20px;
  width: 100%;
  resize: vertical;
  min-height: 120px;
  height: 181px;
}

.zip {
  width: 106px;
  flex-shrink: 0;
}

.tel {
  width: 100px;
  flex-shrink: 0;
}

/* ========================================
   PHONE INPUTS
   ======================================== */
.phone-inputs-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.phone-separator {
  color: #D9D9D9;
  flex-shrink: 0;
}

/* ========================================
   SELECT STYLES
   ======================================== */
.select-wrapper {
  position: relative;
  display: inline-block;
  width: 236px;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 42%;
  transform: translateY(-50%) rotate(45deg);
  width: 5px;
  height: 5px;
  border-right: 2px solid #e60033;
  border-bottom: 2px solid #e60033;
  pointer-events: none;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 40px 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: white;
  color: #111;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  max-height: 100px;
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.postal-button {
  background-color: #8C8C8C;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 14px;
  height: 40px;
}

.submit-btn{
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 65px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.customer-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.customer-btn-form {
  margin: 0 40px;
  display: flex;
  justify-content: flex-end;
}

.submit-btn:disabled {
  color: #FFFFFF;
  background-color: #FECACA;
  pointer-events: none;
}

.handle-btn {
  width: 44%;
}

#back-btn {
  background-color: #8C8C8C;
}

/* ========================================
   BUTTON HOVER EFFECTS
   ======================================== */
.submit-btn:hover,
.customer-btn:hover {
  background-color: var(--primary-color-hover);
}

.postal-button:hover,
#back-btn:hover {
  background-color: #595959;
}

/* ========================================
   ERROR STYLES
   ======================================== */
.error {
  color: var(--error-color);
  font-size: 12px;
  margin-top: 5px;
}

.error-input {
  border-color: #E60012 !important;
  background: #fff0f0;
}

.invalid {
  border: 1px solid #D6082E !important;
}

.error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background-color: var(--background-color);
  color: #E60012;
  border-radius: 50%;
  margin-right: 5px;
  font-size: 12px;
  border: 1px solid red;
}

.error-message {
  margin-top: 20px;
  text-align: center;
}

/* ========================================
   FORM ACTIONS
   ======================================== */
.form-actions {
  text-align: center;
  justify-content: flex-end;
}

/* ========================================
   NOTES SECTION
   ======================================== */
.contact-notes {
  background-color: #F8F8F8;
  border-radius: 4px;
  margin: 40px;
}

.notes-content {
  font-size: 13px;
  margin-top: 15px;
}

.notes-content h3 {
  margin-bottom: 10px;
  font-size: 14px;
}

.bullet {
  list-style: none;
  padding-left: 25px;
  line-height: 25px;
}

.bullet li {
  position: relative;
}

.bullet li::before {
  content: '\2022';
  position: absolute;
  left: -15px;
  font-size: 20px;
}

.arrow-link a {
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
}

.arrow-link a:hover {
  opacity: 0.5;
}


.contact-notes p {
  margin: 0;
  font-size: 12px;
}

/* ========================================
   MESSAGE STYLES
   ======================================== */
.message h2 {
  font-size: 22px;
  color: #333;
  text-align: center;
  margin-bottom: 30px;
}

.message p {
  text-align: left;
  margin: auto;
  line-height: 1.7;
}

.contact-box {
  border: 1px solid #333;
  padding: 15px 35px 20px;
  display: inline-block;
  margin: 20px auto;
  text-align: left;
  width: 50%
}

.contact-box p {
  margin: 8px 0;
}

.contact-box .row {
  display: flex;
  align-items: baseline;
  margin-top: 5px;
}

.contact-box .label {
  width: 90px;
  flex-shrink: 0;
}

.tel-detail {
  display: flex;
  flex-direction: column;
}

.sub-info {
  padding-left: 0;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
}

.center {
  text-align: center;
  padding: 0px 10px;
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.loading-spinner div {
  width: 3em;
  height: 3em;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-show {
  display: flex !important;
}

@keyframes spin { 
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

.loading-spinner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
  pointer-events: none;
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 40px;
  right: 80px;
  z-index: 100;
  border: none;
  outline: none;
  background-color: lightgrey;
  color: white;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 50%;
  font-size: 18px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  opacity: 0.7;
  background: url("../images/bttop.svg");
  width: 60px;
  height: 60px;
}

#back-to-top:hover {
  opacity: 1;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.flex-row {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.pd10-bt {
  font-size: 14px;
  padding: 10px 0;
  word-wrap: break-word;
  word-break: break-word;
}

#cooldown-message {
  justify-content: center;
  margin-top: 20px;
}

#data-holder {
  display: none;
}

.note {
  font-size: 13px;
}

/* ========================================
   FOOTER STYLES
   ======================================== */
.site-footer {
  background-image: url("../images/bg.png");
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 20px 0px;
  margin-top: 16px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 80%;
  max-width: 100%;
  margin: 0 auto;
}

.footer_list {
  gap: 80px;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.footer_li {
  position: relative;
  white-space: nowrap;
}

.footer_link {
  color: white;
  font-size: 14px;
}

.footer_link:hover {
  opacity: 0.5;
}

.footer-copy {
  color: #999;
  font-size: 0.75rem;
  white-space: nowrap;
}

.form-input.tel:focus,
.form-input.zip:focus {
  border-color: #595959;
  outline: none;
}

/* ========================================
   RESPONSIVE DESIGN - TABLET (932px)
   ======================================== */
@media screen and (max-width: 932px) {
  .header-content {
    width: 100%;
    padding: 10px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .header-content a {
    height: 30px;
  }
  
  .logo {
    margin: 0;
    height: 100%;
  }
  
  #tittle-header {
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    position: static;
    left: auto;
    transform: none;
  }
  
  .steps {
    font-size: 11px;
  }
  
  .form-panel {
    padding: 24px;
    margin: 30px 0px;
  }
  
  .form-row>div[style*="display: flex"] {
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }
  
  .inputs-group[style] {
    min-width: 0;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }
  
  .form-input.zip {
    min-width: 60px;
    width: 60px;
    flex: 0 0 60px;
  }
  
  .zip-code-container{
    gap: 10%;
  }
  
  .postal-button {
    min-width: 80px;
    font-size: 12px;
    padding: 10px 7px;
    height: 40px;
    white-space: normal;
    word-break: break-all;
    flex: 0 0 auto;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: center;
    width: 90%;
  }
  
  .footer-content p {
    margin: 0.5em 1em;
  }
  
  .footer_list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .footer_li {
    padding: 5px 15px 5px 12px;
    white-space: nowrap;
  }
  
  .footer_li::after {
    content: none;
  }
  
  .footer_li {
    flex-basis: 100%;
  }
  
  .footer_link {
    font-size: 11px;
  }
  
  .error {
    font-size: 12px;
  }
  
  .bullet {
    margin-left: 20px;
  }

  .message h2 {
    font-size: 18px;
  }
  
  .message p {
    width: auto;
    font-size: 14px;
  }
  
  .contact-box {
    width: auto;
    padding: 10px;
  }
  
  .sub-info {
    font-size: 11px;
  }
  
  #back-to-top{
    right: 24px;  
  }
} 

/* ========================================
   RESPONSIVE DESIGN - MOBILE (440px)
   ======================================== */
@media screen and (max-width: 440px) {
  .wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .container {
    padding: 24px;
  }
  
  .steps {
    padding: 0 10px;
    margin-bottom: 24px;
    margin-top: 0px;
  }

  .step {
    max-width: 120px;
  }

  .step::after {
    top: 15px;
    right: calc(-40% + 20px);
    width: 55px;
  }
  
  .step-content {
    gap: 6px;
  }

  .form-row {
    flex-direction: column;
    gap: 0px;
  }

  .form-mobile {
    flex-direction: row;
    gap: 24px;
  }
  
  .numbering {
    width: 33px;
    height: 33px;
    font-size: 14px;
  }
  
  .step-text {
    font-size: 14px;
    margin-top: 3px;
  }
  
  .step-mobile{
    display: block;
  }

  .form-panel {
    padding: 24px;
    margin: 30px 0px;
  }

  .form-label-sub {
    margin-bottom: 5px;
  }
  
  .inputs-group {
    width: 100%;
    gap: 5px; 
  }
  
  .form-input.zip {
    width: 70px;
    flex : none;
  }
  
  textarea.form-input {
    height: 181px;
  }
  
  .postal-button {
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .submit-btn {
    padding: 10px 35px;
    width: 100%;
  }
  
  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .footer-link {
    margin: 0;
  }
  
  .phone-inputs-wrapper {
    gap: 10px;
  }
  
  .tel {
    flex: 1;
    min-width: 0;
    width: auto;
  }
  
  .phone-separator {
    font-size: larger;
  }
  
  .customer-btn-form {
    margin: 0px;
  }
  
  .form-group.name-section {
    margin-bottom: 24px;
  }
  
  .form-group.address-section {
    margin-bottom: 24px;
  }
  
  .form-group.phone-section {
    margin-bottom: 24px;
  }
  
  .form-group.email-section {
    margin-bottom: 24px;
  }
  
  .form-label-sub {
    margin-top: 0px;
  }
  
  .form-input.w250 {
    width: 100%;
    font-size: 14px;
    padding: 9px 10px;
    color: black;
  }
  
  .contact-notes {
    margin: 30px 0px;
  }

  .handle-btn {
    padding: 10px 30px;
  }
  
  .pd10-bt {
    padding: 1px 0;
  }

  .footer_list {
    gap: 0px;
  }

  .w100 {
    width: 100%;
  }
  
  .note-text {
    font-size: 12px;
    margin-right: 0px;
   }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE (390px)
   ======================================== */
@media screen and (max-width: 390px) {
  .form-input.zip {
    min-width: 40px !important;
    width: 50px;
    flex: 0 0 55px;
    font-size: smaller;
    padding: 10px 5px; 
  }

  .header-content a {
    height: 20px;
  }

  #tittle-header {
    font-size: 14px;
  }

  .message h2 {
    font-size: 16px!important;
  }

  .message p {
    font-size: 14px!important;
    line-height: 2!important;
  }

  .submit-btn {
    padding: 10px 30px;
  }
  
  .step {
     margin-left: -5px;
  }
  
  .note {
    font-size: 9px;
  }
}