/* CF7 common form styling (match recruit design) */
:root {
  --primary-navy: #0F1C2E;
  --primary-gold: #D6B25E;
  --primary-gold-hover: #B89A45;
  --text-dark: #333333;
  --bg-white: #FFFFFF;
  --border-color: #E0E0E0;
}

.wpcf7 {
  max-width: 800px;
  margin: 40px auto;
  background: var(--bg-white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  font-family: 'Outfit', 'Noto Serif JP', sans-serif;
  color: var(--text-dark);
  overflow: visible;
}

.wpcf7 form {
  display: grid;
  gap: 16px;
}

.wpcf7 label,
.wpcf7 .ggj-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-navy);
}

.wpcf7 .ggj-required::after {
  content: " *";
  color: #d9534f;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #fff;
  line-height: 1.4;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.3s;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
  border-color: var(--primary-gold);
  outline: none;
}

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

.wpcf7 .wpcf7-form-control.wpcf7-radio,
.wpcf7 .wpcf7-form-control.wpcf7-checkbox {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wpcf7 .wpcf7-list-item {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wpcf7 .wpcf7-list-item-label {
  margin-left: 0;
}

.wpcf7 .wpcf7-form-control-wrap {
  display: block;
}

.wpcf7 input[type="radio"],
.wpcf7 input[type="checkbox"] {
  accent-color: var(--primary-gold);
  transform: scale(1.1);
}

.wpcf7 .wpcf7-submit {
  display: inline-block;
  width: 100%;
  padding: 15px 40px;
  border: 0;
  border-radius: 50px;
  background: var(--primary-gold);
  color: var(--primary-navy);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wpcf7 .wpcf7-submit:hover {
  background: var(--primary-gold-hover);
}

.wpcf7 .wpcf7-not-valid-tip {
  font-size: 0.9em;
  color: #d9534f;
}

.wpcf7 .wpcf7-response-output {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
}

@media (max-width: 600px) {
  .wpcf7 {
    padding: 20px;
    margin: 20px auto;
  }
}

/* ========================================
   Dark Theme Override for #cta Section
   ======================================== */

#cta .wpcf7 {
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  color: #ffffff;
}

#cta .wpcf7 form {
  display: grid;
  gap: 20px;
}

#cta .wpcf7 p {
  margin-bottom: 20px;
  color: #ffffff;
}

#cta .wpcf7 label,
#cta .wpcf7 .ggj-label {
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  font-family: 'Noto Sans JP', sans-serif;
  display: block;
}

#cta .wpcf7 .ggj-required::after {
  color: #ff6b6b;
}

#cta .wpcf7 input[type="text"],
#cta .wpcf7 input[type="email"],
#cta .wpcf7 input[type="tel"],
#cta .wpcf7 input[type="number"],
#cta .wpcf7 input[type="date"],
#cta .wpcf7 textarea,
#cta .wpcf7 select {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 4px;
  color: #ffffff;
  font-size: 15px;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#cta .wpcf7 input::placeholder,
#cta .wpcf7 textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#cta .wpcf7 input:focus,
#cta .wpcf7 textarea:focus,
#cta .wpcf7 select:focus {
  outline: none;
  border-color: #C5A059;
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

#cta .wpcf7 textarea {
  min-height: 120px;
  resize: vertical;
}

/* Select dropdown with custom arrow */
#cta .wpcf7 select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Radio and Checkbox Container */
#cta .wpcf7 .wpcf7-form-control.wpcf7-radio,
#cta .wpcf7 .wpcf7-form-control.wpcf7-checkbox {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

/* Radio and Checkbox Items */
#cta .wpcf7 .wpcf7-list-item {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  color: #ffffff !important;
  padding: 8px 0 !important;
}

#cta .wpcf7 .wpcf7-list-item-label {
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  margin: 0 !important;
  cursor: pointer !important;
  line-height: 1.5 !important;
}

/* Custom Radio Button Styling */
#cta .wpcf7 input[type="radio"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  margin: 0 !important;
  border: 2px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 50% !important;
  background-color: transparent !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  position: relative !important;
  transition: all 0.2s ease !important;
}

#cta .wpcf7 input[type="radio"]:hover {
  border-color: #C5A059 !important;
  background-color: rgba(197, 160, 89, 0.1) !important;
}

#cta .wpcf7 input[type="radio"]:checked {
  border-color: #C5A059 !important;
  background-color: rgba(197, 160, 89, 0.2) !important;
}

#cta .wpcf7 input[type="radio"]:checked::before {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background-color: #C5A059 !important;
}

/* Custom Checkbox Styling */
#cta .wpcf7 input[type="checkbox"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  margin: 0 !important;
  border: 2px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 3px !important;
  background-color: transparent !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  position: relative !important;
  transition: all 0.2s ease !important;
}

#cta .wpcf7 input[type="checkbox"]:hover {
  border-color: #C5A059 !important;
  background-color: rgba(197, 160, 89, 0.1) !important;
}

#cta .wpcf7 input[type="checkbox"]:checked {
  border-color: #C5A059 !important;
  background-color: #C5A059 !important;
}

#cta .wpcf7 input[type="checkbox"]:checked::before {
  content: '✓' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: bold !important;
}


/* Form Control Wrap */
#cta .wpcf7 .wpcf7-form-control-wrap {
  position: relative;
  display: block;
}

/* Submit Button - Gold Gradient */
#cta .wpcf7 .wpcf7-submit {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(to right, #C5A059, #E5C578, #C5A059);
  background-size: 200% auto;
  border: none;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-top: 10px;
}

#cta .wpcf7 .wpcf7-submit:hover {
  background-position: right;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(197, 160, 89, 0.4);
}

/* Validation Messages */
#cta .wpcf7 .wpcf7-not-valid-tip {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 5px;
  display: block;
}

#cta .wpcf7 .wpcf7-response-output {
  margin-top: 20px;
  padding: 15px;
  border-radius: 4px;
  color: #ffffff;
}

#cta .wpcf7 .wpcf7-validation-errors,
#cta .wpcf7 .wpcf7-acceptance-missing {
  border: 2px solid #ff6b6b;
  background-color: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
}

#cta .wpcf7 .wpcf7-mail-sent-ok {
  border: 2px solid #4ade80;
  background-color: rgba(74, 222, 128, 0.1);
  color: #4ade80;
}

#cta .wpcf7 .wpcf7-spinner {
  margin-left: 10px;
}