/* =========================================================
 * RCS 共通スタイル
 *  - 検索フォーム
 *  - 検索結果テキスト
 *  - 記録証カード
 *  - 認証モーダル
 * =======================================================*/

/* ---------- 全体ラッパ ---------- */

.rcs-wrap {
  max-width: 980px;
  margin: 0 auto 40px;
  padding: 0 10px;
  box-sizing: border-box;
}

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

.rcs-row {
  margin-bottom: 16px;
}

.rcs-row-btn {
  text-align: center;
}

/* ---------- フォーム ---------- */

.rcs-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 14px;
}

.rcs-input {
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
}

/* テーブルレイアウトとの干渉を避けるため block にしておく */
.rcs-form .rcs-row {
  display: block;
}

/* ---------- ボタン共通 ---------- */

.rcs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  padding: 8px 22px;
  border-radius: 3px;
  border: none;
  background: #222;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.rcs-btn:hover,
.rcs-btn:focus {
  opacity: 0.9;
}

/* サブボタン（キャンセル等） */
.rcs-btn.rcs-btn-sub {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ccc;
}

.rcs-btn.rcs-btn-sub:hover,
.rcs-btn.rcs-btn-sub:focus {
  background: #eee;
}

/* 検索結果の「記録証出力」ボタンを中央に */
.rcs-results .rcs-row-btn .rcs-btn {
  margin: 0 auto;
}

/* ---------- 検索結果テキスト ---------- */

#rcsResults {
  margin-top: 20px;
}

.rcs-result-text {
  white-space: pre-wrap;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.rcs-msg {
  padding: 10px 12px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 14px;
}

.rcs-err {
  padding: 10px 12px;
  background: #ffe5e5;
  border-radius: 4px;
  color: #c00;
  font-size: 14px;
}

/* ---------- 記録証カード（PNG 画像表示） ---------- */

.rcs-cert {
  margin: 24px 0;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.rcs-cert-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.rcs-cert-img-wrap {
  text-align: center;
  margin-bottom: 12px;
}

.rcs-cert-img-wrap img {
  max-width: 100%;
  height: auto;
  border: 1px solid #eee;
}

.rcs-cert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* 保存ボタン / 印刷ボタン */
.rcs-btn-save,
.rcs-btn-print {
  min-width: 120px;
}

/* ---------- 認証モーダル ---------- */

.rcs-verify-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.rcs-verify-modal {
  background: #fff;
  width: 100%;
  max-width: 820px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  padding: 28px 32px 26px;
  box-sizing: border-box;
  text-align: center;
}

/* 上部ロゴ */
.rcs-verify-logo {
  margin-bottom: 12px;
}

.rcs-verify-logo img {
  max-width: 360px;
  width: 100%;
  height: auto;
}

/* タイトル */
.rcs-verify-title {
  margin: 6px 0 18px;
  font-size: 22px;
  font-weight: 700;
}

/* 説明文 */
.rcs-verify-desc {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.7;
}

/* ★ 入力フォーム：中央揃え＋一定幅に固定 ★ */
.rcs-verify-input {
  display: block;
  width: 70%;
  max-width: 480px;
  margin: 0 auto 8px;       /* 中央寄せ */
  padding: 10px 12px;
  font-size: 18px;
  line-height: 1.4;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* エラー表示 */
.rcs-verify-error {
  min-height: 1.2em;
  font-size: 13px;
  color: #c00;
  margin-top: 4px;
}

/* ボタン行（キャンセル / OK） */
.rcs-verify-btnrow {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* モバイル対応 */
@media (max-width: 599px) {
  .rcs-verify-modal {
    padding: 24px 16px 20px;
  }

  .rcs-verify-input {
    width: 90%;
    max-width: none;
    font-size: 16px;
  }

  .rcs-verify-btnrow {
    flex-direction: column;
  }

  .rcs-verify-btnrow .rcs-btn {
    width: 100%;
  }
}