/*
  This CSS is designed to style the legacy table-based form
  to match the modern design of the main website.
*/

/* 1. Reset & Basic Setup
------------------------------------------------------------*/
#wrapper {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 5%;
  box-shadow: none;
  border: none;
  background-color: transparent;
}

body {
  font-family: &#039;Noto Sans JP&#039;, sans-serif;
  background-color: #ffffff;
  color: #212529;
  line-height: 1.8;
  font-weight: 300;
}

/* 2. Section Header
------------------------------------------------------------*/
.section__ttl {
  font-family: &#039;Playfair Display&#039;, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: #2c3e50; /* --primary-color */
  text-align: center;
  margin-bottom: 10px;
  background-color: transparent;
  padding: 0;
  font-weight: 700;
}

#txt_explain {
  text-align: center;
  color: #6c757d; /* --text-secondary */
  margin-bottom: 40px;
}

/* 3. Form Table Styling (Corrected)
------------------------------------------------------------*/
.table {
  width: 100%;
  border: none;
  border-collapse: collapse;
}

/* Treat each row as a block to manage spacing */
.table tr {
    display: block;
    margin-bottom: 1.5rem;
}

/* Stack label (th) and input (td) vertically */
.table th,
.table td {
  display: block; /* This makes both stack vertically */
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  text-align: left;
}

.table th {
  font-weight: 500;
  color: #212529; /* --text-primary */
  margin-bottom: 8px;
  font-size: 1rem;
}

.table th .red_txt {
    display: inline-block;
    margin-left: 0.5em;
    font-size: 0.8em;
    color: #e74c3c;
    font-weight: normal;
}
/* Assuming the CMS wraps the required text in this span */
.table th span.red_txt::before {
    content: "必須";
}


/* 4. Input Fields Styling
------------------------------------------------------------*/
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
textarea {
  display: block;
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  font-family: &#039;Noto Sans JP&#039;, sans-serif;
  border: 1px solid #dee2e6; /* --border-color */
  border-radius: 4px;
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  outline: none;
  border-color: #3498db; /* --secondary-color */
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

textarea {
  height: 150px;
  resize: vertical;
}

/* Styles for multi-input fields like Name */
.form-group-inline {
    display: flex;
    align-items: center;
    gap: 0.8em; /* Adjust spacing between elements */
    flex-wrap: wrap;
}

.form-group-inline input[type="text"] {
    flex: 1; /* Allow inputs to grow and fill available space */
    min-width: 120px; /* Prevent inputs from becoming too small */
}


/* 5. Submit Button
------------------------------------------------------------*/
.button_box {
  text-align: center;
  padding: 0;
  margin-top: 2rem;
}

.button_box input[type="submit"] {
  display: inline-block;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background-color: #2c3e50; /* --primary-color */
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.button_box input[type="submit"]:hover {
  background-color: #34495e;
  transform: translateY(-2px);
}

/* 6. Site Link
------------------------------------------------------------*/
.site-return-box {
  text-align: center;
  margin-top: 2rem;
}
.site-return-link {
    display: inline-block;
    color: #6c757d; /* --text-secondary */
    text-decoration: none;
    font-size: 0.9rem;
}
.site-return-link:hover {
    text-decoration: underline;
}

/* 7. Error Message
------------------------------------------------------------*/
.red_txt {
  color: #e74c3c;
  text-align: center;
  margin-bottom: 20px;
}