F/*
 * style.css
 * 応募フォーム用CSS
 */

/* ====================
 * 基本設定
 * ==================== */
body {
    font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
    margin: 0;
    background-color: #2B2B2B; /* 薄いグレーの背景 */
    color: ＃fffff; /* 標準テキスト色 */
}

/* ====================
 * レイアウト・共通パーツ
 * ==================== */
.img {
    image-rendering: -webkit-optimize-contrast;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.banner {
    margin : 0 auto;
    height: 150px;
    width: 150px;
    display: block;
    /*margin-bottom: 10px;*/ /* バナーとコンテンツの間に余白 */
}
.banner2 {
    margin : 0 auto;
    height: 252px;
    width: 300px;
    display: block;
    /*margin-bottom: 10px;*/ /* バナーとコンテンツの間に余白 */
}

.container {
    margin: 20px auto;
    max-width: 600px;
    padding: 0 15px;
    box-sizing: border-box;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 5px;
    font-weight: 900;
    font-size: 26px;

}

form {
    /*background-color: #2B2B2B;*/ /* 白いフォーム背景 */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 影を強調 */
}

/* ====================
 * フォーム要素
 * ==================== */
dl {
    margin-bottom: 20px;
}

dl dt {
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 8px;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    padding-left: 5px; /* 左側に少し余白 */
}

dl dd {
    margin-bottom: 15px;
    padding-left: 0px; /* 値の左側に余白 */
margin-inline-start:5px;

}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: calc(100% - 20px); /* paddingとborderを考慮 */
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
    color: #333;
    background-color: #fdfdfd;
}

select {
  option[value=""] {
    display: none;
  }
}

input:disabled{
    background-color: #bbbbbb;}

textarea {
    resize: vertical; /* 垂直方向のみリサイズ可能 */
    min-height: 100px;
}


input[type="file"] {
    width: 100%;
    padding: 10px 0;
    color: #555;
}

/* サムネイルプレビュー */
.thumbnail-preview {
    margin-top: 10px;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
    display: inline-block; /* 画像がない場合は表示しない */
    width: 110px; /* サムネイル枠の固定幅 */
    height: 110px; /* サムネイル枠の固定高さ */
    box-sizing: border-box;
    overflow: hidden; /* 枠からはみ出る画像を隠す */
    text-align: center; /* 画像を中央に */
    vertical-align: middle; /* 垂直方向中央 */
}

.thumbnail-preview img {
    width: 100px; /* サムネイルの固定幅 */
    height: 100px; /* サムネイルの固定高さ */
    object-fit: cover; /* 画像が枠に収まるように調整 */
    display: block;
    margin: auto; /* 中央寄せ */
}

/* ====================
 * ボタン
 * ==================== */
input[type="submit"],
input[type="button"] {
    background-color: #fffff;
    color: #2b2b2b;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    width: 100%; /* 横幅いっぱいに */
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    margin-top: 20px; /* 上部に余白 */
    display: block; /* ブロック要素にして縦に積む */
}

input[type="submit"]:hover:enabled,
input[type="button"]:hover:enabled {
    background-color: #fffff; }

input[type="submit"]:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* ====================
 * エラー・注意書き
 * ==================== */
.required-star {
    color: #cc0000; /* 赤色を強調 */
    font-weight: bold;
    margin-left: 5px;
}

.error-message {
    color: #cc0000;
    font-weight: bold;
    margin-top: 5px;
    display: block;
    font-size: 0.9em;
}

.error-messages-container {
    background-color: #ffe0e0;
    border: 1px solid #ff9999;
    color: #cc0000;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: left;
}

.error-messages-container .error-message {
    margin: 5px 0;
    font-size: 1em;
    font-weight: normal;
    display: block;
}

.info-text {
    font-size: 0.9em;
    color: #666;
}

.attention-box {
    background-color: #e8e8e8;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 30px;
    color: #444;
    font-size: 0.9em; /* 注意事項のフォントサイズ -1 */
}

.attention-box h2 {
    font-size: 1.2em;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px dashed #bbb;
    padding-bottom: 10px;
}

.attention-box ul {
    margin: 0;
    padding-left: 25px;
    list-style-type: disc;
    line-height: 1.6;
}

.attention-box ul li {
    margin-bottom: 8px;
}

p.required-note {
    color: #cc0000;
    font-weight: bold;
    text-align: right;
    margin-bottom: 15px;
}

/* ====================
 * 確認画面・完了画面用
 * ==================== */
/* 確認画面のdlはフォームのdlとは別の見栄えにするため、
   confirm.phpのdlに`confirm-dl`クラスを追加する */
.confirm-dl dt {
    margin-top: 15px; /* 入力画面より少し間隔を狭める */
    margin-bottom: 5px;
    padding-bottom: 3px;
    font-size: 1.1em; /* 少し大きく */
    background-color: #efefef; /* 項目名の背景色を少し濃く */
    border-left: 3px solid #666; /* 左にアクセントライン */
}

.confirm-dl dd {
    word-wrap: break-word; /* 長い文字列の折り返し */
    padding: 8px 10px;
    background-color: #fdfdfd; /* 値の背景色 */
    border: 1px solid #e0e0e0; /* 値の枠線 */
    border-radius: 4px;
    margin-bottom: 15px; /* 値の下に余白 */
    line-height: 1.6; /* 行間を広げて読みやすく */
margin-inline-start:5px;


}

img.confirm-image {
    max-width: 150px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: block;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* 確認画面のフォームボタンのコンテナ */
.confirm-buttons-container {
    margin-top: 30px; /* 上部の余白 */
}

/* 確認画面内の個別のボタン */
.confirm-buttons-container input[type="button"],
.confirm-buttons-container input[type="submit"] {
    width: 100%; /* 親要素の幅いっぱいに */
    margin-top: 0;
    margin-bottom: 15px; /* ボタン間に間隔を設ける */
}

/* 最後のボタンのマージンを調整 */
.confirm-buttons-container input[type="submit"]:last-child {
    margin-bottom: 0;
}

/* 完了画面用 */
.completion-message {
    text-align: center;
}

.completion-message a {
    display: inline-block;
    background-color: #444;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.completion-message a:hover {
    background-color: #222;
}

/* ====================
 * レスポンシブ対応
 * ==================== */

@media (max-width: 768px) {
    .container {
        margin: 15px auto;
        padding: 0 10px;
    }

    form {
        padding: 15px;
    }

    input[type="text"],
    input[type="email"],
    input[type="date"],
    input[type="number"],
    textarea {
        width: calc(100% - 14px); /* レスポンシブ時のpaddingとborderを考慮 */
        font-size: 15px;
        padding: 10px;
    }

    input[type="submit"],
    input[type="button"] {
        font-size: 16px;
        padding: 10px 15px;
        margin-top: 10px; /* スマホではマージンを詰める */
    }

    .confirm-buttons-container input[type="button"],
    .confirm-buttons-container input[type="submit"] {
        margin-bottom: 10px; /* スマホ時のボタン間の縦方向余白 */
    }

    .confirm-buttons-container input[type="submit"]:last-child {
        margin-bottom: 0;
    }

    .completion-message a {
        width: auto;
        padding: 10px 20px;
        font-size: 16px;
    }

    .attention-box {
        padding: 15px 20px;
    }

    .attention-box h2 {
        font-size: 1.1em;
    }

    img.confirm-image {
        max-width: 100px;
    }

    .confirm-dl dt {
        font-size: 1em;
        margin-top: 10px;
        padding-left: 3px;
    }

    .confirm-dl dd {
        padding: 6px 8px;
        margin-bottom: 10px;
    }

}