/* ===================================================================
   contact.css - Contact Page Specific Styles
   株式会社シグナス お問い合わせページ専用スタイルシート
   =================================================================== */

/* ===================================================================
   Contact Page Layout
   =================================================================== */
#contact {
  width: 100%;
  margin: 0 auto 60px;
}

#contact > section {
  width: min(900px, 90%);
  margin: 0 auto;
  padding: 40px 0;
}

/* ===================================================================
   Contact Intro
   =================================================================== */
.contact-intro {
  text-align: center;
  margin-bottom: 48px;
}

.contact-intro p {
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 8px;
}

.contact-intro p:last-child {
  margin-bottom: 0;
}

/* ===================================================================
   Form Styling
   =================================================================== */
.contact-form {
  background: var(--color-white);
  border: 1px solid var(--color-frame);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
}

.form-group {
  margin-bottom: 28px;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.required,
.optional {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 3px;
  margin-left: 8px;
  letter-spacing: 0.1em;
}

.required {
  background: #EF5285;
  color: var(--color-white);
}

.optional {
  background: var(--color-gray-200);
  color: var(--color-gray-600);
}

.form-control {
  width: 100%;
}

.form-control input[type="text"],
.form-control input[type="tel"],
.form-control input[type="email"],
.form-control select,
.form-control textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--color-heading);
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font-sans);
}

.form-control input[type="text"]:focus,
.form-control input[type="tel"]:focus,
.form-control input[type="email"]:focus,
.form-control select:focus,
.form-control textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(28, 55, 184, 0.1);
}

.form-control input::placeholder,
.form-control textarea::placeholder {
  color: var(--color-muted);
}

.form-control textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.7;
}

.form-control 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='%23555555' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===================================================================
   Privacy Agreement
   =================================================================== */
.privacy-agreement {
  margin-top: 40px;
  padding: 24px;
  background: #f7f9ff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-frame);
}

.privacy-checkbox {
  margin-bottom: 12px;
}

.privacy-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  cursor: pointer;
  vertical-align: middle;
}

.privacy-checkbox label {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-heading);
  cursor: pointer;
  vertical-align: middle;
}

.privacy-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
  margin: 0;
}

.privacy-text a {
  color: var(--color-brand);
  text-decoration: underline;
}

/* ===================================================================
   Error Messages
   =================================================================== */
.error-messages {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: #fff3f3;
  border: 1px solid #ffcdd2;
  border-radius: var(--radius-md);
  color: #c62828;
}

.error-messages ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.error-messages li {
  margin-bottom: 4px;
  line-height: 1.6;
}

.error-messages li:last-child {
  margin-bottom: 0;
}

/* ===================================================================
   Submit Button
   =================================================================== */
.form-submit {
  margin-top: 40px;
  text-align: center;
}

.btn-submit {
  display: inline-block;
  min-width: 240px;
  padding: 16px 48px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--color-white);
  background: var(--color-brand);
  border: 2px solid var(--color-brand);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
}

@media (hover: hover) {
  .btn-submit:hover {
    background: var(--color-white);
    color: var(--color-brand);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(28, 55, 184, 0.2);
  }
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  background: var(--color-gray-200);
  border-color: var(--color-gray-200);
  color: var(--color-gray-600);
  cursor: not-allowed;
}

/* ===================================================================
   Confirm Page Styling
   =================================================================== */
.contact-confirm {
  background: var(--color-white);
  border: 1px solid var(--color-frame);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
}

.confirm-table {
  margin: 32px 0;
}

.confirm-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--color-frame);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.confirm-table th,
.confirm-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-frame);
}

.confirm-table tr:last-child th,
.confirm-table tr:last-child td {
  border-bottom: none;
}

.confirm-table th {
  width: 200px;
  background: var(--color-table-header-bg);
  color: var(--color-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.confirm-table td {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.8;
}

.confirm-table td.pre-wrap {
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ===================================================================
   Form Buttons (Confirm Page)
   =================================================================== */
.form-buttons {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-back {
  display: inline-block;
  min-width: 180px;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--color-gray-600);
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
}

@media (hover: hover) {
  .btn-back:hover {
    background: var(--color-gray-100);
    border-color: var(--color-gray-500);
    color: var(--color-gray-500);
  }
}

/* ===================================================================
   Complete Page Styling
   =================================================================== */
.contact-complete {
  background: var(--color-white);
  border: 1px solid var(--color-frame);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  text-align: center;
}

.complete-icon {
  margin: 0 auto 32px;
  display: flex;
  justify-content: center;
}

.complete-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-heading);
  margin-bottom: 32px;
}

.complete-message {
  margin-bottom: 40px;
}

.complete-message p {
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 8px;
}

.complete-message p:last-child {
  margin-bottom: 0;
}

.complete-note {
  padding: 20px;
  background: #f7f9ff;
  border-radius: var(--radius-md);
  margin-bottom: 40px;
}

.complete-note p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.complete-note p:last-child {
  margin-bottom: 0;
}

.complete-button {
  margin-top: 48px;
}

.btn-home {
  display: inline-block;
  min-width: 240px;
  padding: 16px 48px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--color-brand);
  background: var(--color-white);
  border: 2px solid var(--color-brand);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s ease;
}

@media (hover: hover) {
  .btn-home:hover {
    background: var(--color-brand);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(28, 55, 184, 0.2);
  }
}

/* ===================================================================
   Responsive Adjustments
   =================================================================== */

/* Mobile (〜767px) */
@media (max-width: 767.98px) {
  #contact > section {
    padding: 32px 0;
  }

  .contact-form,
  .contact-confirm,
  .contact-complete {
    padding: 24px 20px;
  }

  .contact-intro {
    margin-bottom: 32px;
  }

  .form-group {
    margin-bottom: 24px;
  }

  .confirm-table table {
    border: none;
  }

  .confirm-table tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid var(--color-frame);
    border-radius: var(--radius-md);
  }

  .confirm-table th,
  .confirm-table td {
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--color-frame);
  }

  .confirm-table th {
    background: var(--color-table-header-bg);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .confirm-table td {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .confirm-table tr:last-child th,
  .confirm-table tr:last-child td {
    border-bottom: 1px solid var(--color-frame);
  }

  .confirm-table td:last-child {
    border-bottom: none;
  }

  .form-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .btn-back,
  .btn-submit,
  .btn-home {
    min-width: 100%;
    padding: 14px 32px;
  }

  .complete-note br.pc-only {
    display: none;
  }

  .complete-complete {
    padding: 40px 24px;
  }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024.98px) {
  .contact-form,
  .contact-confirm {
    padding: 32px 28px;
  }

  .confirm-table th {
    width: 180px;
  }
}
