/* ===== submit_comment.css – 改良版（そのまま差し替えOK） ===== */

/* 投稿フォーム */
.comment-form {
    background: #ffffff;
    padding: 1em;
    border: 2px solid #ffe2f6;
    border-radius: 8px;
    max-width: 700px;
    margin: 0 auto 30px;
    text-align: left;
}

.comment-form fieldset {
    border: none;
    padding: 0;
    margin-bottom: 1em;
}

.comment-form legend {
    font-weight: bold;
    margin-bottom: 0.5em;
    display: block;
}

/* 入力欄 */
.comment-form input[type="text"],
.comment-form textarea {
    width: 100%;
    padding: 0.5em;
    margin: 0.5em 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    font: inherit;
    line-height: 1.5;
    box-sizing: border-box;
}

.comment-form textarea {
    min-height: 6.5em;
    resize: vertical;
}

/* ラジオの当たり判定を広げる */
.comment-form fieldset label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .6rem;
    border-radius: 8px;
    cursor: pointer;
}

.comment-form input[type="radio"] {
    inline-size: 1.1rem;
    block-size: 1.1rem;
}

/* フォーカス可視化（キーボード操作◎） */
.comment-form input[type="text"]:focus-visible,
.comment-form textarea:focus-visible,
.comment-form button:focus-visible,
.comment-form input[type="submit"]:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
    border-radius: 6px;
}

/* 送信ボタン（コントラストAAの青） */
.comment-form button,
.comment-form input[type="submit"] {
    background-color: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    /* タップしやすさ */
    transition: background-color .2s ease, transform .06s ease;
}

.comment-form button:hover,
.comment-form input[type="submit"]:hover {
    background-color: #1d4ed8;
}

.comment-form button:active,
.comment-form input[type="submit"]:active {
    transform: translateY(1px);
}

.comment-form button:disabled,
.comment-form input[type="submit"]:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* コメント一覧 */
.comments {
    max-width: 700px;
    display: grid;
    gap: 20px;
}

.comment {
    background-color: #fff;
    border-left: 4px solid #ffe2f6;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .05);
    text-align: left;
}

.comment p {
    margin: .25rem 0 .5rem;
}

.comment small {
    color: #6b7280;
    font-size: .85em;
}

/* バッジ（種類で色分けしたい時はクラス追加） */
.badge {
    background: #6b7280;
    color: #fff;
    padding: 0.2em 0.6em;
    font-size: 0.8em;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: .3em;
    margin-bottom: 0.3em;
}

.badge::before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    background-image: url('../images/sakura1.PNG');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    margin-right: 0.3em;
}


.badge--used {
    background: #059669;
}

/* 使わせてもらいました */
.badge--feedback {
    background: #2563eb;
}

/* ご意見・ご感想 */

/* 説明テキストは中央寄せ、フォームと一覧は左寄せ */
main {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

main .comment-form,
main .comments {
    text-align: left;
}

/* モバイル微調整 */
@media (max-width: 480px) {

    .comment-form,
    .comments {
        margin: 0 12px 24px;
    }
}

/* 視覚的に隠すユーティリティ（honeypotラベルなど用） */
.visually-hidden {
    position: absolute !important;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 1px, 1px);
    white-space: nowrap;
    border: 0;
}

/* 動きを減らす設定の尊重 */
@media (prefers-reduced-motion: reduce) {

    .comment-form button,
    .comment-form input[type="submit"] {
        transition: none;
    }
}