/* 口コミ投稿フォーム */
#review-form {
    padding: 20px;
    border-radius: 5px;
    max-width: 600px;
    border: 1px solid #ededed;
    display: flex;
    flex-direction: column;
    gap: 15px; /* 各要素の間隔を統一 */
}

/* ✅ フォームのラベルと入力欄を縦並びにする */
#review-form .form-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 0px; /* 項目間の間隔を20pxから15pxに縮小 */
}

/* ✅ コメントポリシーだけ横並びにする */
#review-form .comment-policy {
    display: flex; /* ✅ チェックボックスとテキストのみ横並び */
    align-items: center;
    gap: 5px; /* チェックボックスとテキストの間隔 */
    width: 100%;
}

/* ✅ チェックボックスのサイズを適切に調整 */
#review-form .comment-policy input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

/* ✅ コメントポリシーのラベルをチェックボックスの横に配置 */
#review-form .comment-policy label {
    font-size: 1em;
    color: #333;
    cursor: pointer;
    display: inline-flex; /* ✅ 横並びを強制 */
    align-items: center;
}

/* ✅ ラベルのスタイル */
#review-form label {
    font-weight: 600;
    font-size: 1em;
    color: #333;
    text-align: left;
    margin-bottom: 5px; /* ラベルと入力欄の間隔を8pxから5pxに縮小 */
}

/* 入力フィールド、選択フィールド、テキストエリアの共通スタイル */
#review-form input[type="text"],
#review-form textarea,
#review-form select {
    width: 100%; /* フル幅 */
    max-width: 100%; /* デスクトップでは適度な幅に */
    padding: 8px; /* パディングを10pxから8pxに縮小 */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    text-align: left; /* テキストを左寄せ */
    margin-top: 2px; /* 上部の余白を追加 */
}

/* フォーカス時のスタイル */
#review-form input[type="text"]:focus,
#review-form textarea:focus,
#review-form select:focus {
    border-color: #3498db;
    outline: none;
}

/* テキストエリアのサイズを大きめに */
#review-form textarea {
    min-height: 100px; /* テキストエリアの高さを150pxから120pxに縮小 */
    resize: vertical;
}

/* ✅ 評価選択のドロップダウン */
#review-form select {
    width: 150px;
    padding: 10px;
}

/* 評価ラベルのスタイル */
#review-form .rating-label {
    margin-bottom: 10px;
    font-size: 0.9em;
    font-weight: bold;
    color: #555;
}

/* ✅ 送信ボタン（最初はグレーで無効） */
#review-form button[type="submit"] {
    background-color: #ccc; /* 最初はグレー */
    color: white;
    font-size: 1.1em;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: not-allowed; /* 最初は押せない */
    width: 100%;
    max-width: 400px; /* 送信ボタンも適度な幅に */
    transition: background-color 0.3s ease;
}

/* ✅ チェックを入れたらボタンがブルーに */
#review-form button[type="submit"].active {
    background-color: #3498db; /* チェックが入ったらブルー */
    cursor: pointer;
}

/* ✅ ホバー時のボタン */
#review-form button[type="submit"].active:hover {
    background-color: #2980b9;
}


/* ✅ スマートフォン対応 */
@media (max-width: 768px) {
    #review-form {
        width: 100%;
    }

    #review-form .form-row {
        align-items: flex-start; /* スマホでも左寄せ */
    }

    #review-form label {
        width: 100%; /* ラベルを全幅にすることで、自然な見た目に */
        text-align: left;
    }

    #review-form input[type="text"],
    #review-form textarea,
    #review-form select {
        width: 100%; /* スマホではフル幅に */
        max-width: none; /* スマホでは制限を解除 */
    }

    #review-form button[type="submit"] {
        width: 100%; /* スマホではボタンもフル幅 */
        max-width: none;
    }

    #review-form .comment-policy {
        flex-direction: row; /* ✅ スマホでも横並び */
        align-items: center;
    }
}








/*口コミ*/
.msr-review-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.msr-review-content {
    flex-grow: 1;
}
.msr-review-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.msr-review-name {
    font-weight: bold;
    margin-bottom: 5px;
}
.msr-review-rating-title {
    display: flex;
    align-items: center;
}
.msr-review-rating {
    color: #ffb400;
    font-size: 1.2em;
    margin-right: 10px;
}
.msr-review-title {
    font-weight: bold;
    font-size: 1.1em;
}
.msr-review-meta {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 10px;
}
.msr-review-body {
    font-size: 1em;
    color: #333;
}
.msr-review-footer {
    margin-top: 10px;
    font-size: 0.9em;
    color: #888;
}
/*総合評価*/
.msr-review-summary {
    margin: 20px 0;
    font-family: Arial, sans-serif;
}
.msr-review-summary .total-rating {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.msr-review-summary .star-rating-container {
    display: flex;
    align-items: center;
    margin-top: 8px; /* 上部との適度な間隔 */
}

.msr-review-summary .star-rating {
    color: #ffb400;
    font-size: 1.2em;
        margin-right: 8px; /* 星と口コミ数の間の余白 */
}
.msr-review-summary .review-count {
    font-size: 0.9em;
    color: #888;
    margin-top: 5px;
}
.msr-review-summary .rating-distribution {
    margin-top: 15px;
}
.msr-review-summary .rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.msr-review-summary .rating-bar span {
    width: 40px; /* テキスト部分の幅を固定 */
    font-size: 0.9em;
    margin-right: 5px;
    white-space: nowrap; /* 改行を防止 */
}
.msr-review-summary .bar-container {
    position: relative;
    background-color: #e0e0e0;
    width: calc(100% - 90px); /* テキストとパーセンテージのスペースを除いた幅 */
    height: 12px;
    border-radius: 5px;
}
.msr-review-summary .bar {
    position: absolute;
    background-color: #ffb400;
    height: 100%;
    border-radius: 5px;
}
.msr-review-summary .rating-percentage {
    margin-left: 10px;
    font-size: 0.9em;
    color: #333;
    width: 40px; /* パーセンテージ部分の幅を固定 */
    text-align: right;
    white-space: nowrap; /* 改行を防止 */
}

/* ポップアップのスタイル */
.popup {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5); /* 背景の半透明 */
}
.popup-content {
    background-color: #fff;
    margin: auto; /* 中央に表示するための余白 */
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    position: relative;
    top: 50%;
    transform: translateY(-50%); /* 垂直方向に中央揃え */
}
.popup-content p{
font-size:12px;
}
.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close-btn:hover, .close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}



/* 並べ替えフォーム全体のスタイル */
.msr-sort-form {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
/*    font-family: Arial, sans-serif;*/
}

/* ラベルのスタイル */
.msr-sort-label {
/*    font-size: 16px;*/
    margin-right: 10px;
    color: #333;
    font-weight: bold;
}

/* セレクトボックスのラッパー */
.msr-sort-wrapper {
    position: relative;
    display: inline-block;
}

/* セレクトボックスのスタイル */
.msr-sort-select {
/*    font-size: 16px;*/
    padding:5px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    appearance: none;
    background-color: #fff;
/*    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);*/
    cursor: pointer;
}

/* セレクトボックスの矢印アイコンをカスタマイズ */
.msr-sort-wrapper::after {
    content: '▼';
    font-size: 12px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
}

/* セレクトボックスがフォーカスされた時のスタイル */
.msr-sort-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
}

/* セレクトボックスのオプションスタイル（モバイル対応） */
.msr-sort-select option {
    padding: 10px;
}


/* 続きを見るボタンのスタイル */
.load-more-btn {
    display: inline-block;
    padding: 5px 10px;
/*    background-color: #0073aa;
    color: #fff;*/
    border: none;
    border-radius: 4px;
/*    font-size: 16px;*/
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background-color: #ededed;
}

.load-more-btn .btn-text {
    display: inline-block;
}

.load-more-btn .btn-loader {
    display: inline-block;
    margin-left: 10px;
/*    font-size: 16px;*/
/*    color: #fff;*/
    vertical-align: middle;
}

.load-more-btn:disabled {
/*    background-color: #ccc;*/
    cursor: not-allowed;
}

/* コメントポリシー用の特別なスタイル */
#review-form .policy-check-container {
    margin: 10px 0; /* 上下の余白を調整 */
}

#review-form .form-row.full-width.policy-check-container {
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px; /* チェックボックスとテキストの間隔を設定 */
}

/* チェックボックスのスタイル */
#review-form #comment-policy-check {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ラベルのスタイル */
#review-form .policy-check-container label {
    margin: 0 !important;
    padding: 0 !important;
    font-weight: normal;
    width: auto;
    display: inline-block !important;
}
