/*
  このファイルはアプリケーション全体のCSSスタイルを定義します。
  カードベースのモダンなデザインを採用しています。
*/

/* ====================
 基本スタイル & リセット
 ==================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  caret-color: transparent !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

/* ====================
 ヘッダー
 ==================== */
header {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}

h2 {
  font-size: 18px;
  color: #555;
  margin-bottom: 15px;
  border-bottom: 2px solid #667eea;
  padding-bottom: 5px;
}

/* ====================
 ステータス表示 (サーバー接続状態)
 ==================== */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #666;
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: #ccc;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

/* ====================
 カード (各セクションのコンテナ)
 ==================== */
.card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ====================
 フォーム要素 (input, select)
 ==================== */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.form-group input,
.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s;
  margin-bottom: 15px;
}

/* name-input と email-input のみキャレットを表示 */
#name-input,
#email-input {
  caret-color: auto !important;
}

.form-group input:focus,
.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #999;
  font-size: 12px;
}

/* hidden要素の完全非表示 */
input[type="hidden"],
.form-control[type="hidden"] {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  caret-color: transparent !important;
}

/* チェックボックスのキャレット非表示 */
input[type="checkbox"] {
  caret-color: transparent !important;
}

/* ====================
 ラジオボタン
 ==================== */
.radio-label {
  display: inline-flex;
  align-items: center;
  margin-right: 20px;
  cursor: pointer;
  font-size: 16px;
}

.radio-label input[type="radio"] {
  width: auto;
  margin-right: 8px;
  margin-bottom: 0;
  cursor: pointer;
  caret-color: transparent !important;
}

.radio-label span {
  user-select: none;
}

/* ====================
 ボタン
 ==================== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
}

.btn-secondary:hover:not(:disabled) {
  background: #e0e0e0;
}

.btn-large {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  margin-bottom: 20px;
}

/* ====================
 チェックボックス
 ==================== */
.checkbox-label {
  display: flex;
  align-items: center;
  margin: 15px 0;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
}

/* ====================
 情報ボックス (確認画面などで使用)
 ==================== */
.info-box {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 5px;
  padding: 15px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.info-box p {
  margin: 5px 0;
}

.info-box strong {
  color: #555;
  margin-right: 5px;
}

/* ====================
 メッセージボックス (成功・エラー・警告)
 ==================== */
.error-box,
.warning-box {
  padding: 15px;
  border-radius: 5px;
  margin: 15px 0;
}

.error-box,
.error-message {
  background: #fee;
  border: 1px solid #fcc;
  color: #c00;
  border-radius: 5px;
  padding: 15px;
}

.warning-box {
  background: #fff9e6;
  border: 1px solid #ffeb99;
  color: #996600;
}

.success-message {
  padding: 15px;
  background: #e6ffe6;
  border: 1px solid #99ff99;
  color: #006600;
  border-radius: 5px;
}

/* ====================
 同意セクションのテキストエリア
 ==================== */
.consent-text {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.consent-text ul {
  margin-left: 20px;
  margin-top: 10px;
}

.consent-text li {
  margin: 5px 0;
}

/* ====================
 会場フィルター
 ==================== */
.filter-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.filter-container select {
  flex: 1;
}

/* ====================
 ローディング画面
 ==================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid white;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

  100% {
    transform: rotate(360deg);
  }
}

.loading-overlay p {
  margin: 5px 0;
}

.loading-detail {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 10px;
  min-height: 20px;
}

/* ====================
 ユーティリティ
 ==================== */
.hidden {
  display: none !important;
}

/* ====================
 レスポンシブ対応 (スマートフォン向け)
 ==================== */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .card {
    padding: 15px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 16px;
  }

  .btn {
    font-size: 14px;
  }

  .radio-label {
    display: flex;
    margin-bottom: 10px;
  }
}
