/* ==========================================================================
   あいち産業振興機構 メールマガジン フォーム共通CSS
   ========================================================================== */

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "メイリオ", Meiryo, sans-serif;
  color: #333;
  background-color: #f5f5f5;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #2563eb;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  background: #fff;
  border-bottom: 2px solid #e53e3e;
  padding: 12px 24px;
}

.header__inner {
  max-width: 960px;
}

.header__logo {
  width: fit-content;
  display: flex;
}

.header__logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.header__inner.aichi, .header__inner.dx {
  color: #000000;
  font-size: 1.5rem;
  font-weight: bold;
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.main {
  flex: 1;
  padding: 40px 24px 60px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.page-title {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 24px;
  color: #333;
}

.page-description {
  margin-bottom: 32px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #555;
}

.page-description p {
  margin-bottom: 4px;
}

.page-description a {
  color: #2563eb;
}

/* ==========================================================================
   Form Card
   ========================================================================== */
.form-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 40px 48px;
  margin-bottom: 24px;
}

/* ==========================================================================
   Form Row (入力画面)
   ========================================================================== */
.form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 28px;
}

.form-label {
  width: 200px;
  flex-shrink: 0;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: bold;
}

.form-fields {
  flex: 1;
}

/* Badge */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: bold;
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
  line-height: 1.4;
}

.badge--required {
  background-color: #e53e3e;
}

.badge--optional {
  background-color: #718096;
}

/* Input */
.form-input,
.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #333;
  background-color: #fff;
  transition: border-color 0.2s;
  appearance: none;
}

.form-input::placeholder {
  color: #aaa;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input + .form-input {
  margin-top: 12px;
}

/* Select wrapper */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #666;
  pointer-events: none;
}

.form-select {
  padding-right: 40px;
  cursor: pointer;
}

.form-select option[value=""] {
  color: #aaa;
}

.form-select option:not([value=""]) {
  color: #333;
}

.form-select.is-placeholder {
  color: #aaa;
}

/* Note text */
.form-note {
  font-size: 0.8rem;
  color: #666;
  margin-top: 6px;
}

/* Add email button */
.btn-add-email {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  background-color: #e53e3e;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-add-email:hover {
  background-color: #c53030;
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  padding-top: 12px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}

/* ==========================================================================
   Confirm Row (確認画面)
   ========================================================================== */
.confirm-list {
  padding: 0;
}

.confirm-row {
  display: flex;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid #e2e8f0;
}

.confirm-row:first-child {
  border-top: 1px solid #e2e8f0;
}

.confirm-label {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: bold;
}

.confirm-value {
  flex: 1;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.8;
}

.confirm-value p + p {
  margin-top: 8px;
}

/* ==========================================================================
   Warning Text
   ========================================================================== */
.warning-text {
  text-align: center;
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 24px;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */
.btn-wrapper {
  text-align: center;
  margin-top: 24px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
  padding: 14px 40px;
  background-color: #4a7ab5;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: inherit;
  position: relative;
  text-decoration: none;
  line-height: 1.5rem;
}

.btn-submit:hover {
  background-color: #3a6a9f;
}

/* ==========================================================================
   Complete Page
   ========================================================================== */
.complete-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 48px;
  text-align: left;
}

.complete-card h2 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 16px;
}

.complete-card p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 16px;
}

.complete-card .link-back {
  display: block;
  text-align: center;
  margin-top: 40px;
  color: #2563eb;
  font-size: 0.9rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  color: #888;
  background-color: #f5f5f5;
}

/* ==========================================================================
   Responsive (SP)
   ========================================================================== */
@media screen and (max-width: 768px) {
  .header {
    padding: 10px 16px;
  }

  .header__logo img {
    height: 36px;
  }

  .main {
    padding: 24px 16px 40px;
  }

  .page-title {
    font-size: 1.2rem;
    text-align: left;
    margin-bottom: 16px;
  }

  .page-description {
    font-size: 0.85rem;
  }

  .form-card {
    padding: 24px 16px;
  }

  /* Form rows stack vertically on mobile */
  .form-row {
    flex-direction: column;
    margin-bottom: 20px;
  }

  .form-label {
    width: 100%;
    padding-top: 0;
    margin-bottom: 8px;
  }

  .form-fields {
    width: 100%;
  }

  /* Confirm rows stack vertically on mobile */
  .confirm-row {
    flex-direction: column;
    gap: 4px;
  }

  .confirm-label {
    width: 100%;
  }

  .confirm-value {
    width: 100%;
    padding-left: 0;
  }

  .complete-card {
    padding: 32px 20px;
  }

  .checkbox-group {
    gap: 12px;
  }

  .btn-wrapper {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
  }

  .btn-wrapper .btn,
  .btn-wrapper .btn-submit {
    width: 100%;
  }
}

/* ==========================================================================
   Form Error
   ========================================================================== */
.form-error {
  color: #e53e3e;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

/* ==========================================================================
   Buttons (Bootstrap-like)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
  padding: 14px 40px;
  background-color: #4a7ab5;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: inherit;
  position: relative;
  text-decoration: none;
  line-height: 1.5rem;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Primary */
.btn-primary {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

/* Secondary */
.btn-secondary {
  background-color: #6b7280;
  border-color: #6b7280;
  color: #fff;
}

.btn-secondary:hover {
  background-color: #4b5563;
  border-color: #4b5563;
  color: #fff;
}

/* Success */
.btn-success {
  background-color: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.btn-success:hover {
  background-color: #15803d;
  border-color: #15803d;
  color: #fff;
}

/* Danger */
.btn-danger {
  background-color: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn-danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

/* Warning */
.btn-warning {
  background-color: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

.btn-warning:hover {
  background-color: #d97706;
  border-color: #d97706;
  color: #fff;
}

/* Info */
.btn-info {
  background-color: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}

.btn-info:hover {
  background-color: #0284c7;
  border-color: #0284c7;
  color: #fff;
}

/* Light */
.btn-light {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  color: #333;
}

.btn-light:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
  color: #333;
}

/* Outline variants */
.btn-outline-primary {
  background-color: transparent;
  border-color: #2563eb;
  color: #2563eb;
}

.btn-outline-primary:hover {
  background-color: #2563eb;
  color: #fff;
}

.btn-outline-secondary {
  background-color: transparent;
  border-color: #6b7280;
  color: #6b7280;
}

.btn-outline-secondary:hover {
  background-color: #6b7280;
  color: #fff;
}

.btn-outline-danger {
  background-color: transparent;
  border-color: #dc2626;
  color: #dc2626;
}

.btn-outline-danger:hover {
  background-color: #dc2626;
  color: #fff;
}

/* Sizes */
.btn-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.1rem;
}

/* Block */
.btn-block {
  display: flex;
  width: 100%;
}

/* Arrow modifiers */
.btn-arrow-left::before {
  content: "\276E";
  margin-left: 5px;
  position: absolute;
  left: 10px;
}

.btn-arrow-right::after {
  content: "\276F";
  margin-right: 5px;
  position: absolute;
  right: 10px;
}

/* From */
form {
  width: 100%;
}

/* ==========================================================================
   DXコンソーシアム 入会申込・会員情報更新フォーム専用
   （RegisterDxConsortium, UpdateMemberDxConsortium）
   ========================================================================== */
.dx-form .form-row { flex-direction: column; }
.dx-form .form-label { width: auto; margin-bottom: 6px; }
.dx-form .form-fields { width: 100%; }
.dx-form .checkbox-group { flex-direction: column; align-items: flex-start; gap: 10px; }
.dx-form .checkbox-group label { align-items: flex-start; }
.dx-form .checkbox-group input[type="checkbox"] { margin-top: 4px; flex-shrink: 0; }
.dx-form .radio-group { display: flex; gap: 24px; padding-top: 8px; }
.dx-form .radio-group label,
.dx-form .radio-group input { cursor: pointer; }
.dx-form .other-input { margin-top: -4px; margin-left: 24px; width: calc(100% - 24px); }
.dx-form .tech-topics-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
.dx-form .tech-topics-group .full-row { grid-column: 1 / -1; }
.dx-form .tech-topics-group .other-row { grid-column: 1 / -1; }
.dx-form .other-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.dx-form .other-row label { flex-shrink: 0; }
.dx-form .other-row .other-input { flex: 1; margin: 0; min-width: 200px; }

/* 確認画面 複数選択値のリスト表示 */
.confirm-bullet-list {
  list-style: disc;
  padding-left: 1.2em;
  margin: 0;
}
.confirm-bullet-list li {
  margin: 2px 0;
}
