/* 申し込み期間外表示 */
.out-of-period-container {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  margin: 0;
  width: 100%;
}

.out-of-period-content {
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 119, 204, 0.2);
  max-width: 700px;
  width: 100%;
  padding: 40px;
  text-align: center;
  margin: 0 auto;
}

.period-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.out-of-period-content h1 {
  color: #ff6b6b;
  font-size: 2rem;
  margin-bottom: 10px;
}

.period-message {
  color: #666;
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.period-info,
.schedule-info,
.contact-section {
  margin-bottom: 30px;
  text-align: left;
}

.period-info h3,
.schedule-info h3,
.contact-section h3 {
  color: #0077cc;
  font-size: 1.3rem;
  margin-bottom: 15px;
  border-bottom: 2px solid #e0f0ff;
  padding-bottom: 8px;
}

.period-dates {
  background-color: #f8fafc;
  border: 2px solid #e0f0ff;
  border-radius: 10px;
  padding: 20px;
}

.period-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.period-item:last-child {
  border-bottom: none;
}

.period-label {
  font-weight: 600;
  color: #555;
}

.period-value {
  font-weight: bold;
  color: #0077cc;
}

.schedule-timeline {
  background-color: #f0f8ff;
  border-left: 4px solid #0077cc;
  border-radius: 8px;
  padding: 20px;
}

.timeline-item {
  display: flex;
  margin-bottom: 15px;
  align-items: center;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-date {
  background-color: #0077cc;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 140px;
  text-align: center;
  margin-right: 15px;
}

.timeline-content {
  color: #333;
  font-weight: 500;
  flex: 1;
}

.contact-section {
  background-color: #f0f8ff;
  border-radius: 10px;
  padding: 20px;
  border-left: 4px solid #0077cc;
}

.contact-section h3 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.contact-section p {
  margin: 8px 0 0 0;
  color: #555;
}

.navigation-buttons {
  text-align: center;
  margin-top: 30px;
}

.back-button {
  background: linear-gradient(135deg, #0077cc 0%, #005aa0 100%);
  color: white;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 119, 204, 0.3);
  min-width: 200px;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 204, 0.4);
  background: linear-gradient(135deg, #005aa0 0%, #004080 100%);
}

/* フォーム専用スタイル */
.form-main {
  padding: 20px;
  min-height: calc(100vh - 120px);
}

.form-container {
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 119, 204, 0.2);
  max-width: 700px;
  margin: 0 auto;
  padding: 30px;
}

.form-container h1 {
  text-align: center;
  color: #0077cc;
  margin-bottom: 30px;
  font-size: 1.8rem;
  border-bottom: 3px solid #0077cc;
  padding-bottom: 15px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.form-group label.required::after {
  content: " *";
  color: #ff0000;
  font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #fafafa;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0077cc;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-note {
  font-size: 0.9rem;
  color: #666;
  margin-top: 5px;
  line-height: 1.4;
}

.form-note a {
  color: #0077cc;
  text-decoration: none;
}

.form-note a:hover {
  text-decoration: underline;
}

/* 名前入力フィールド */
.name-group {
  display: flex;
  gap: 15px;
}

.name-field {
  flex: 1;
}

.name-field label {
  font-size: 0.9rem;
  margin-bottom: 5px;
  font-weight: 600;
  color: #555;
}

.name-group input {
  width: 100%;
}

/* 生年月日入力フィールド */
.birthday-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.birthday-group select {
  width: auto;
  min-width: 80px;
  flex: 1;
}

.birthday-group span {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

/* チェックボックス */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0077cc;
  cursor: pointer;
}

.checkbox-item label {
  margin: 0;
  cursor: pointer;
  font-weight: normal;
  flex: 1;
}

.checkbox-item.agreement {
  background-color: #f0f8ff;
  border: 2px solid #d0eaff;
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
}

.checkbox-item.agreement label {
  font-weight: 600;
  color: #0077cc;
}

/* 同意チェック項目のスタイル */
/* consent-group全体のフォントサイズを少し小さく */
.consent-group {
  font-size: 0.92em;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 20px 20px 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* 上部説明文 */
.consent-group > label:first-child {
  font-size: 1em;
  font-weight: 500;
  color: #333;
  margin-bottom: 14px;
  line-height: 1.5;
  display: block;
}

/* チェック行を中央寄せ・横並び・1行で収める */
.consent-check-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 0;
  margin-top: 0;
  min-height: 32px;
  width: 100%;
}

/* チェックボックスを標準サイズに */
.consent-group input[type="checkbox"] {
  width: 26px;
  height: 26px;
  accent-color: #1976d2;
  margin: 0 0 0 0;
  vertical-align: middle;
}

/* 「同意する」ラベルを1行で収める */
.consent-group label[for^="agree"] {
  font-weight: 600;
  color: #222;
  font-size: 1em;
  margin: 0 0 0 0;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.1;
  padding-left: 2px;
}

/* リンク */
.consent-group > label > a {
  color: #1976d2;
  text-decoration: underline;
  font-weight: 600;
}

/* 必須バッジ */
.consent-group .mid {
  background: #c00;
  color: #fff;
  font-size: 0.9em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: bold;
}

/* 住所入力フィールド */
.address-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.postal-code label,
.prefecture label,
.city label,
.building label {
  font-size: 0.9rem;
  margin-bottom: 5px;
  font-weight: 600;
  color: #555;
}

.postal-input {
  display: flex;
  align-items: center;
  gap: 5px;
}

.postal-input input {
  flex: 1;
  max-width: 80px;
}

.postal-input span {
  font-weight: bold;
  color: #666;
}

/* 送信ボタン */
.form-submit {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid #e0f0ff;
}

.submit-button {
  background: linear-gradient(135deg, #0077cc 0%, #005aa0 100%);
  color: white;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 119, 204, 0.3);
  min-width: 280px;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 204, 0.4);
  background: linear-gradient(135deg, #005aa0 0%, #004080 100%);
}

.submit-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 119, 204, 0.3);
}

/* バリデーションエラー表示 */
.error-message {
  color: #ff0000;
  font-size: 0.9rem;
  margin-top: 5px;
  display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #ff0000;
}

.form-group.error .error-message {
  display: block;
}

.error-input {
  border: 2px solid #e74c3c !important;
  background-color: #fff6f6;
}

/* ローディングモーダル */
.loading-content {
  background-color: #ffffff;
  margin: 15% auto;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 119, 204, 0.3);
  width: 90%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #e0f0ff;
  border-top: 6px solid #0077cc;
  border-radius: 50%;
  margin: 0 auto 20px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-content h2 {
  color: #0077cc;
  margin: 0 0 10px 0;
  font-size: 1.5rem;
}

.loading-content p {
  color: #666;
  margin: 0;
  font-size: 1rem;
}

/* 成功モーダル */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #ffffff;
  margin: 2% auto;
  padding: 0;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 119, 204, 0.3);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-header {
  background: linear-gradient(135deg, #0077cc 0%, #005aa0 100%);
  color: white;
  padding: 30px;
  text-align: center;
  border-radius: 15px 15px 0 0;
}

.success-icon {
  width: 80px;
  height: 80px;
  background-color: #4CAF50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: bold;
  color: white;
  margin: 0 auto 20px auto;
  animation: checkmarkPop 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}

@keyframes checkmarkPop {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.3) rotate(-90deg);
    opacity: 0.8;
  }
  70% {
    transform: scale(0.9) rotate(0deg);
    opacity: 1;
  }
  85% {
    transform: scale(1.1) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.success-header h2 {
  margin: 0 0 10px 0;
  font-size: 1.8rem;
}

.success-header p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

.success-body {
  padding: 30px;
}

.success-body h3 {
  color: #0077cc;
  font-size: 1.3rem;
  margin-bottom: 15px;
  border-bottom: 2px solid #e0f0ff;
  padding-bottom: 8px;
}

.confirmation-section {
  margin-bottom: 30px;
}

.confirmation-details {
  background-color: #f8fafc;
  border: 2px solid #e0f0ff;
  border-radius: 10px;
  padding: 20px;
  font-size: 0.95rem;
}

.confirmation-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.confirmation-item:last-child {
  border-bottom: none;
}

.confirmation-label {
  font-weight: 600;
  color: #555;
  min-width: 120px;
}

.confirmation-value {
  color: #333;
  flex: 1;
  text-align: right;
}

.next-steps {
  margin-bottom: 30px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.step-number {
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, #0077cc 0%, #005aa0 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.step-content strong {
  color: #0077cc;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 5px;
}

.step-content p {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

.contact-info {
  background-color: #f0f8ff;
  border-radius: 10px;
  padding: 20px;
  border-left: 4px solid #0077cc;
}

.contact-info h3 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.contact-info p {
  margin: 8px 0;
  color: #555;
}

.success-footer {
  padding: 20px 30px;
  border-top: 2px solid #e0f0ff;
  display: flex;
  justify-content: center;
}

.back-to-top-button {
  padding: 16px 40px;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  background: linear-gradient(135deg, #0077cc 0%, #005aa0 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 119, 204, 0.3);
}

.back-to-top-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 204, 0.4);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .form-container {
    margin: 10px;
    padding: 20px;
  }

  .form-container h1 {
    font-size: 1.5rem;
  }

  .out-of-period-content {
    padding: 25px 20px;
  }

  .out-of-period-content h1 {
    font-size: 1.6rem;
  }

  .period-message {
    font-size: 1.1rem;
  }

  .period-item {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }

  .timeline-item {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .timeline-date {
    min-width: auto;
    margin-right: 0;
  }

  .back-button {
    width: 100%;
    padding: 14px 20px;
  }

  .name-group {
    flex-direction: column;
    gap: 10px;
  }

  .birthday-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .birthday-group select {
    width: 100%;
    min-width: auto;
  }

  .checkbox-group {
    gap: 10px;
  }

  .checkbox-item {
    padding: 10px 0;
  }

  .submit-button {
    min-width: 100%;
    padding: 14px 20px;
  }

  .postal-input {
    flex-direction: column;
    gap: 8px;
  }

  .postal-input input {
    max-width: 100%;
  }

  .address-group {
    gap: 10px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* iOSのズーム防止 */
  }

  .modal-content {
    margin: 5% auto;
    width: 95%;
  }

  .success-header {
    padding: 25px 20px;
  }

  .success-icon {
    width: 60px;
    height: 60px;
    font-size: 30px;
  }

  .success-header h2 {
    font-size: 1.5rem;
  }

  .success-body {
    padding: 20px;
  }

  .confirmation-item {
    flex-direction: column;
    gap: 5px;
  }

  .confirmation-value {
    text-align: left;
  }

  .success-footer {
    flex-direction: column;
    padding: 20px;
  }

  .close-button,
  .back-to-top-button {
    width: 100%;
  }

  .loading-content {
    margin: 20% auto;
    width: 95%;
    padding: 30px 20px;
  }

  .loading-content h2 {
    font-size: 1.3rem;
  }

  .loading-spinner {
    width: 50px;
    height: 50px;
    border-width: 5px;
  }
}

@media (max-width: 480px) {
  .form-main {
    padding: 10px;
  }

  .form-container {
    padding: 15px;
  }

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

  .checkbox-item.agreement {
    padding: 12px;
  }

  .submit-button {
    font-size: 1rem;
  }

  .birthday-group {
    gap: 8px;
  }

  .birthday-group span {
    font-size: 0.8rem;
  }
}

/* アクセシビリティ改善 */
@media (prefers-reduced-motion: reduce) {
  .form-group input,
  .form-group select,
  .form-group textarea,
  .submit-button {
    transition: none;
  }
}

/* 印刷用スタイル */
@media print {
  .form-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .submit-button {
    display: none;
  }

  .checkbox-item.agreement {
    background-color: transparent;
    border: 1px solid #ccc;
  }
} 