/* Form Styles based on LP04 */

/* Reset & Common */
input[type=checkbox],
input[type=radio] {
  display: none;
}

/* Progress Bar */
.progress-container {
  display: flex;
  justify-content: space-between;
  position: relative;
  width: 90%;
  max-width: 375px;
  /* Mobile width */
  margin: 30px auto 20px;
  align-items: center;
}

.progress-container::before {
  content: "";
  background-color: #bdc3c7;
  position: absolute;
  top: 6px;
  /* Adjusted to align with dots */
  left: 0;
  height: 2px;
  width: 100%;
  /* z-index: -1; Removed to separate from form bg */
}

.progress {
  background-color: #1A3261;
  position: absolute;
  top: 6px;
  left: 0;
  height: 2px;
  width: 0%;
  /* z-index: -1; Removed */
  transition: 0.3s ease-in-out;
}

.step-circle {
  background-color: #bdc3c7;
  border-radius: 50%;
  height: 12px;
  width: 12px;
  display: flex;
  /* Make flex to center label */
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-circle.step-is-active {
  background-color: #1A3261;
}

.step-circle .step-label {
  position: absolute;
  top: -20px;
  font-size: 10px;
  color: #bdc3c7;
  white-space: nowrap;
}

.step-circle.step-is-active .step-label {
  color: #1A3261;
  font-weight: bold;
}

/* Form Container similar to overlay-card but wider */
.form-overlay-container {
  background: #fff;
  width: 100%;
  margin: 0 auto;
  font-family: "Noto Sans JP", sans-serif;
  padding-bottom: 20px;
  display: none;
  /* Hidden until overlay is clicked */
}

.form-overlay-container.visible {
  display: block;
}

/* Overlay hidden state */
.overlay.hidden {
  display: none !important;
}

/* Section Transitions */
.sec {
  display: none;
}

.sec.active {
  display: block;
}

.wrapper {
  padding: 0 10px;
}

/* Headings */
h3.formHead {
  font-size: 16px;
  font-weight: bold;
  color: #1A3261;
  margin-bottom: 20px;
  text-align: left;
}

/* Form List Grid */
ul.formList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

ul.formList li.item {
  width: 48%;
  /* 2 columns */
  margin-bottom: 10px;
}

/* Button Item Styles (Icon + Text) */
ul.formList li.item label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc;
  /* Default gray border */
  border-radius: 8px;
  background: #fff;
  padding: 15px 5px;
  cursor: pointer;
  height: 140px;
  /* Fixed height for consistency */
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

/* Checked State */
ul.formList li.item label.checked,
ul.formList li.item input:checked+span,
/* For Radio structure if used */
ul.formList li.item label:has(input:checked) {
  border: 2px solid #1A3261;
  background-color: #e6f6ff;
  /* Light blue highlight */
}

/* Icon Images */
ul.formList li.item label img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 50%;
  /* If icons are circles */
  background: #f0f0f0;
  /* Fallback bg */
}

/* Text */
ul.formList li.item label span {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  text-align: center;
  line-height: 1.3;
}

/* Navigation Buttons */
.btnArea {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 0 10px;
}

.btnBack {
  color: #777;
  cursor: pointer;
  font-size: 14px;
}

.btnNext {
  color: #1A3261;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
}

/* Footer (inside form based on screenshot) */
.form-footer {
  background: #000;
  color: #fff;
  padding: 10px;
  text-align: center;
  font-size: 10px;
  margin-top: 20px;
}


.form-footer a {
  color: #fff;
  text-decoration: none;
  margin: 0 5px;
}

/* Step 5 Area Selection Styles */
.message-area {
  display: flex;
  align-items: center;
  padding: 15px;
  border-radius: 8px;
  position: relative;
}

.advisor-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  flex-shrink: 0;
  overflow: hidden;
}

.advisor-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-bubble {
  position: relative;
  font-size: 12px;
  color: #333;
  line-height: 1.5;
  flex: 1;
  background: #F1F6F9;
  padding: 5px;
  border-radius: 10px;
  text-align: initial;
}

.message-bubble::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 23px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #f0f7ff;
}

.message-note {
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.message-note i {
  margin-right: 4px;
}


/* Custom Dropdown Styles */
.custom-select-container {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  font-family: inherit;
}

.select-trigger {
  position: relative;
  width: 100%;
  padding: 15px;
  font-size: 16px;
  border: 1px solid #0056b3;
  /* Blue border to match design */
  border-radius: 8px;
  background-color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.select-trigger::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid #333;
  border-bottom: 2px solid #333;
  transform: rotate(45deg);
  margin-top: -5px;
  transition: transform 0.3s;
}

.custom-select-container.open .select-trigger::after {
  transform: rotate(-135deg);
  margin-top: 5px;
}

.options-container {
  position: relative;
  /* top: 100%; Removed for relative positioning */
  /* left: 0; Removed for relative positioning */
  width: 100%;
  background: #fff;
  border: 1px solid #0056b3;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}

.custom-select-container.open .select-trigger {
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #0056b3;
}

.custom-select-container.open .options-container {
  display: block;
}

/* Accordion Styles */
.region-group {
  border-bottom: 1px solid #eee;
}

.region-group:last-child {
  border-bottom: none;
}

.region-header {
  padding: 12px 15px;
  background-color: #f0f2f5;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #333;
}

.region-header::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(45deg);
  transition: transform 0.3s;
}

.region-group.active .region-header::after {
  transform: rotate(-135deg);
}

.prefecture-list {
  display: none;
  padding: 10px;
  background-color: #fff;
}

.region-group.active .prefecture-list {
  display: block;
}

/* Checkbox Items in Dropdown */
.prefecture-item {
  display: flex;
  align-items: center;
  padding: 8px 5px;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  width: 100%;
  border-bottom: none !important;
  /* Override formList styles */
  background: none !important;
  /* Override formList styles */
  height: auto !important;
  /* Override formList styles */
  margin-bottom: 0 !important;
  /* Override */
  box-shadow: none !important;
  /* Override */
}

/* Override default checkbox hiding for this section specifically if needed, 
   but form.css hides input[type=checkbox]. We need to show a custom checkbox or unhide it.
   Let's create a custom checkbox look for consistency with the design image. */

.prefecture-item input[type="checkbox"] {
  display: none;
}

.prefecture-item span {
  display: flex;
  align-items: center;
  font-weight: normal !important;
  font-size: 16px !important;
}

.prefecture-item span::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 10px;
  background-color: #fff;
  flex-shrink: 0;
}

.prefecture-item input[type="checkbox"]:checked+span::before {
  background-color: #003399;
  /* Dark blue check */
  border-color: #003399;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16px' height='16px'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
}

.prefecture-item:hover {
  background-color: #f9f9f9 !important;
}

/* Step 6 Custom Design */

/* Blue box next to headers */
.blue-box {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #1a2b5e;
  vertical-align: sub;
  margin-right: 10px;
  border-radius: 2px;
}

/* Yellow Input Box Container */
.yellow-input-box {
  background-color: #fff9c4;
  /* Light yellow background */
  border: 2px solid #5d9cec;
  /* Blue border */
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Custom Text Input inside Yellow Box */
.custom-text-input {
  width: 100%;
  border: none;
  background: #fff9c4;
  font-size: 1.2rem;
  outline: none;
  padding: 5px 0;
  color: #555;
  font-weight: bold;
}

.custom-text-input::placeholder {
  color: #999;
  font-weight: normal;
}

/* Birth Year Specific Styles */
.birth-year-box {
  justify-content: flex-start;
}

.input-label-bold {
  font-weight: bold;
  font-size: 1.3rem;
  color: #333;
  margin-right: 15px;
}

.input-label-gray {
  color: #999;
  font-size: 1.1rem;
  margin-right: 5px;
}

.custom-num-input {
  width: 80px;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  outline: none;
  padding: 0 5px;
  color: #555;
  font-weight: normal;
}

.input-label-unit {
  font-size: 1.2rem;
  color: #333;
  margin-left: auto;
  /* Push to right */
}

/* Avatar Tooltip Section */
.avatar-tooltip-container {
  display: flex;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 30px;
  padding: 0 10px;
}

.avatar-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
  background-color: #f0f0f0;
  /* Fallback */
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.avatar-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tooltip-box {
  position: relative;
  background-color: #f0f4f8;
  /* Light gray-blue */
  padding: 15px 6px;
  ;
  border-radius: 8px;
  color: #333;
  font-size: 12px;
  line-height: 1.4;
  flex: 1;
}

.tooltip-box::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid #f0f4f8;
}

@media screen and (max-width: 480px) {
  .yellow-input-box {
    padding: 12px 15px;
  }

  .custom-text-input,
  .custom-num-input {
    font-size: 1rem;
  }

  .input-label-bold {
    font-size: 1.1rem;
  }

  .avatar-icon {
    width: 50px;
    height: 50px;
  }

  .tooltip-box {
    font-size: 0.85rem;
    padding: 10px 15px;
  }
}

/* Step 7 Custom Design */

/* No Hyphen Badge */
.no-hyphen-badge {
  position: absolute;
  top: -25px;
  right: 0;
  background-color: #f7f7f7;
  color: #666;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

/* Ensure formUnit has relative positioning for the badge */
#sec7 .formUnit {
  position: relative;
  margin-top: 25px;
  /* Add space for badge */
}

/* Privacy Checkbox Area */
.privacy-check-container {
  margin: 20px 0;
  text-align: justify;
}

.privacy-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  position: relative;
}

.privacy-label input[type="checkbox"] {
  display: inline-block;
  opacity: 0;
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  margin: -1px;
  pointer-events: none;
}

/* Custom Checkbox Box */
.checkmark-box {
  width: 20px;
  height: 20px;
  border: 1px solid #ccc;
  background-color: #fff;
  margin-right: 8px;
  position: relative;
  border-radius: 3px;
  flex-shrink: 0;
}

.privacy-label input[type="checkbox"]:checked+.checkmark-box {
  background-color: #fff;
  border-color: #0056b3;
}

.privacy-label input[type="checkbox"]:checked+.checkmark-box::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #0056b3;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.privacy-link {
  color: #1a2b5e;
  text-decoration: underline;
  margin-right: 2px;
}

/* Avatar Message Block */
.avatar-message-container {
  display: flex;
  align-items: center;
  background-color: #f0f4f8;
  /* Light blue background for the whole block if needed, but mockup shows bubble */
  /* Mockup actually shows: Avatar left, Bubble right. Bubble has text. */
  background: transparent;
  margin-bottom: 30px;
  margin-top: 30px;
}

/* Reuse .avatar-icon from Step 6 */

.message-box {
  position: relative;
  background-color: #f0f4f8;
  padding: 15px 8px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #333;
  flex: 1;
  text-align: justify;
}

.message-box::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid #f0f4f8;
}

.highlight-text {
  color: #1a2b5e;
  font-size: 1.1em;
  font-weight: bold;
}

/* Gold Submit Button */
.gold-submit-btn {
  /* Default Inactive State (Gray) */
  background: #ccc;
  color: #fff !important;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: not-allowed;
  width: 71%;
  box-shadow: none;
  text-align: center;
  position: relative;
  line-height: 1.3;
  transition: all 0.3s ease;
}

/* Active State (Bright Gold) */
.gold-submit-btn.is-active {
  background: #ffeb3b;
  /* Vivid Yellow */
  background: linear-gradient(180deg, #ffeb3b 0%, #fdd835 100%);
  color: #1a2b5e !important;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  border: 3px solid #fff;
  /* Thick white border */
}

.gold-submit-btn.is-active:hover {
  background: #ffe600;
  background-image: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 100vmax rgba(0, 0, 0, 0.6);
  z-index: 10000;
  transform: scale(1.05);
}

.gold-submit-btn .small-text {
  font-size: 12px;
  font-weight: normal;
  display: block;
  margin-bottom: -2px;
}

.gold-submit-btn::after {
  content: '▶';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: inherit;
  /* Inherit from button color */
}

.step7-btn-area {
  align-items: flex-end;
  /* Align bottom */
}

@media screen and (max-width: 480px) {
  .gold-submit-btn {
    width: 70%;
    font-size: 14px;
    padding: 10px;
  }

  .message-box {
    font-size: 12px;
  }
}

/* Autofill Background Fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  border: none !important;
  -webkit-text-fill-color: #555 !important;
  transition: background-color 5000s ease-in-out 0s !important;
  background-color: transparent !important;
}

/* Force yellow background for custom inputs on autofill */
.custom-text-input:-webkit-autofill,
.custom-num-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #fff9c4 inset !important;
  box-shadow: 0 0 0px 1000px #fff9c4 inset !important;
}

/* Submit Button Spotlight Hover Effect */
.gold-submit-btn {
  transition: all 0.3s ease;
}