/* =========================================
   results.css - 結果入力フォーム専用スタイル
   縦位置ズレ防止・サイズ固定・視認性UP
   ========================================= */

/* ===== 大会ID・ラウンド数 横並び＆サイズ固定 ===== */
.form-section {
    display: flex;
    gap: 10px;
    align-items: center; /* ラベル・入力欄・高さを中央揃え */
}

/* 大会ID欄 */
.form-section .input-group.no-field input {
    width: 160px;
    height: 40px; /* プレイヤーカードと同じ高さ */
    font-size: 1.1em;
    box-sizing: border-box;
}

/* ラウンド数欄 */
.form-section .input-group.points-field input {
    width: 100px;
    height: 40px;
    font-size: 1.8em;
    box-sizing: border-box;
}

/* ===== プレイヤーカード全体 ===== */
.player-card {
    display: flex;
    align-items: center; /* 全ての子要素を縦中央揃え */
    gap: 12px;
    margin-bottom: 10px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
}

/* ===== No欄 ===== */
.player-card .input-group.no-field input {
    width: 70px;
    height: 40px;
    font-size: 1.1em;
    text-align: center;
    box-sizing: border-box;
}

/* ===== 点数欄 ===== */
.player-card .input-group.points-field input {
    width: 120px;
    height: 40px;
    font-size: 1.1em;
    text-align: right;
    box-sizing: border-box;
}

/* ===== 着順欄 ===== */
.player-card .rank-display {
    width: 60px;
    height: 40px;
    display: flex;              /* 中央揃え用 */
    align-items: center;        /* 縦中央 */
    justify-content: center;    /* 横中央 */
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    background: #eaeaea;
    border-radius: 4px;
    box-sizing: border-box;

    /* 点数欄との間隔を確保 */
    margin-left: 30px;
}

/* ===== メッセージ表示欄 ===== */
.message {
    margin-top: 12px;
    font-weight: bold;
    color: red;
}

/* ===== 注意書き（強調版） ===== */
.note {
    font-size: 1.1em;      /* ← 少し大きめ */
    font-weight: bold;     /* ← 太字 */
    color: #d32f2f;        /* ← 赤系で注意喚起 */
    text-align: center;    /* ← 中央寄せで目立たせる */
    margin: 12px 0 16px;   /* ← 上下に余白を広めに */
}

/* ===== 送信ボタン ===== */
#submitButton {
    margin-top: 16px;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#submitButton:hover {
    background-color: #0056b3;
}

/* ===== スマホ対応 ===== */
@media (max-width: 600px) {
    .form-section {
        flex-wrap: wrap;
    }
    .form-section .input-group.no-field input {
        width: 120px;
        height: 36px;
        font-size: 1em;
    }
    .form-section .input-group.points-field input {
        width: 80px;
        height: 36px;
        font-size: 1em;
    }
    .player-card {
        gap: 8px;
        padding: 8px;
    }
    .player-card .input-group.no-field input {
        width: 60px;
        height: 36px;
        font-size: 1em;
    }
    .player-card .input-group.points-field input {
        width: 100px;
        height: 36px;
        font-size: 1em;
    }
    .player-card .rank-display {
        width: 50px;
        height: 36px;
        font-size: 1em;
        margin-left: 15px; /* モバイルでは間隔を少し詰める */
    }
}

/* 1) プレイヤーカードの子要素は全て40pxで縦中央 */
.player-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-card > .input-group,
.player-card > .rank-display {
  height: 40px;                 /* 統一高さ */
  display: flex;                /* 縦中央のためflex化 */
  align-items: center;          /* 縦中央 */
}

/* 2) ラベルは行高と余白をゼロ基準にして“横に並ぶ要素”から外す */
.player-card .input-group label {
  margin: 0;
  padding: 0;
  line-height: 1;               /* 行高のブレ消し */
  font-size: 0.9em;
  display: block;               /* ラベルは上、入力は下にしたい場合は block */
}

/* ラベルを左、入力を右で横並びにしたい場合はこの2行をオンにする */
// .player-card .input-group { gap: 6px; }
// .player-card .input-group label { margin-right: 6px; }

/* 3) 入力欄の高さ・行高・内側余白を固定（ブラウザ差を無効化） */
.player-card .input-group input {
  height: 40px;
  line-height: 40px;            /* テキストの縦位置を中心に固定 */
  padding: 0 10px;              /* 上下0にして高さブレを防止 */
  box-sizing: border-box;
  border: 1px solid #ccc;
  font-size: 1.1em;
}

/* iOS/Safari などの見た目差を除去 */
.player-card .input-group input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.player-card .input-group input[type="number"]::-webkit-outer-spin-button,
.player-card .input-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 4) No/点数の幅・配置（必要に応じて調整可） */
.player-card .input-group.no-field input {
  width: 70px;
  text-align: center;
}
.player-card .input-group.points-field input {
  width: 120px;
  text-align: right;
}

/* 5) 着順表示は行高も固定し、点数との間隔30px */
.player-card .rank-display {
  width: 60px;
  height: 40px;
  line-height: 40px;            /* テキストを縦中央に固定 */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 30px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  background: #eaeaea;
  border-radius: 4px;
  box-sizing: border-box;
}

/* 6) 大会ID/ラウンドも同じ思想で揃える */
.form-section {
  display: flex;
  align-items: center;          /* 縦中央 */
  gap: 10px;
}
.form-section .input-group {
  height: 40px;
  display: flex;
  align-items: center;
}
.form-section .input-group label {
  margin: 0 6px 0 0;
  line-height: 1;
  display: block;
}
.form-section .input-group input {
  height: 40px;
  line-height: 40px;
  padding: 0 10px;
  box-sizing: border-box;
  font-size: 1.1em;
}
.form-section .input-group.no-field input { width: 160px; }
.form-section .input-group.points-field input { width: 100px; }

/* 7) スマホでの縮小も同じルール（高さ・行高・padding上下0） */
@media (max-width: 600px) {
  .player-card { gap: 8px; }
  .player-card > .input-group,
  .player-card > .rank-display { height: 36px; }
  .player-card .input-group input {
    height: 36px;
    line-height: 36px;
    padding: 0 8px;
    font-size: 1em;
  }
  .player-card .input-group.no-field input { width: 60px; }
  .player-card .input-group.points-field input { width: 100px; }
  .player-card .rank-display {
    width: 50px;
    line-height: 36px;
    margin-left: 15px;
    font-size: 1em;
  }

  .form-section .input-group { height: 36px; }
  .form-section .input-group input {
    height: 36px;
    line-height: 36px;
    padding: 0 8px;
    font-size: 1em;
  }
  .form-section .input-group.no-field input { width: 120px; }
  .form-section .input-group.points-field input { width: 80px; }
}