/* ************************************************ 
 * ------------------------------------------------
 *	現代的なレビュー画面 CSS
 * ------------------------------------------------
 * ************************************************ */

/* CSS変数定義 */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #3d7cb8;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-light: #e1e5e9;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --star-color: #ffc107;
}

/* ベーススタイル */
body {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e9ecef 100%);
    color: var(--text-primary);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

tr, td, th, div, font {
    font: inherit;
    color: var(--text-primary);
}

form {
    margin: 0;
    padding: 0;
}

img {
    border: 0;
    max-width: 100%;
    height: auto;
}

/* リンクスタイル */
a:link {
    font-size: inherit;
    color: var(--primary-color);
    text-decoration: underline;
    transition: var(--transition);
}

a:visited {
    font-size: inherit;
    color: var(--primary-color);
    text-decoration: underline;
}

a:active {
    font-size: inherit;
    color: var(--primary-color);
    text-decoration: underline;
}

a:hover {
    font-size: inherit;
    color: var(--accent-color);
    text-decoration: none;
    transform: translateY(-1px);
}

/* コンテナ */
.review-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
}

.review-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    text-align: center;
}

.review-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.review-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* ベースカード */
.base01 {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 20px;
    overflow: hidden;
}

.base02 {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

/* テーブルスタイル */
.table1 {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.CELL_1_C {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-align: center;
    font-weight: 600;
    padding: 15px;
}

.CELL_1_L {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-align: left;
    padding: 15px 20px;
    font-weight: 600;
}

.CELL_1_R {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-align: right;
    padding: 15px 20px;
    font-weight: 600;
}

.CELL_2 {
    color: var(--text-primary);
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
}

/* メッセージ表示 */
.info {
    background: linear-gradient(135deg, #e8f4f8, #d1ecf1);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    color: var(--primary-color);
    text-align: left;
    position: relative;
    box-shadow: var(--shadow-light);
}

.info::before {
    content: "&#8505;&#65039;";
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 18px;
}

.info {
    padding-left: 55px;
}

.errorbox {
    background: linear-gradient(135deg, #ffeaea, #ffcccb);
    border: 2px solid var(--accent-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    color: var(--accent-color);
    font-weight: 600;
    position: relative;
    box-shadow: var(--shadow-light);
}

.errorbox::before {
    content: "&#9888;&#65039;";
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 18px;
}

.errorbox {
    padding-left: 55px;
}

/* 注意書き */
.note {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-color);
    background: #fff5f5;
    padding: 8px 12px;
    border-radius: 15px;
    border: 1px solid var(--accent-color);
    display: inline-block;
    margin-top: 5px;
}

.note2 {
    font-size: 13px;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 8px 12px;
    border-radius: 15px;
    border: 1px solid var(--border-light);
    display: inline-block;
    margin-top: 5px;
}

/* タイトルエリア */
.title_area {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border-bottom: 1px solid var(--primary-color);
}

.title_area a:link,
.title_area a:hover,
.title_area a:visited,
.title_area a:active {
    text-decoration: none;
    color: white;
}

.shop_title {
    font-size: 20px;
    color: white;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.standard-border {
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--shadow-light);
}

/* 商品ボックス */
.product_box {
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

/* 商品画像 */
.pro_img {
    width: 150px;
    float: left;
    margin: 0 20px 20px 0;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.pro_img img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border: none;
    padding: 0;
    background: white;
}

/* 右側ボックス */
.right_box {
    overflow: hidden;
    padding: 20px;
}

.pro_title {
    font-weight: 700;
    font-size: 20px;
    margin: 0 0 20px;
    color: var(--primary-color);
    line-height: 1.4;
}

.pro_title a {
    font-size: 20px;
    color: var(--primary-color);
    text-decoration: none;
}

.pro_title a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* ナビゲーションボタン */
.navi_btn {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.navi_btn p {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.navi_btn p a {
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-align: center;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(44, 90, 160, 0.3);
}

.navi_btn a:hover {
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.navi_btn a:visited {
    color: white;
    text-decoration: none;
}

/* レビューレコード */
.record {
    width: 100%;
    max-width: 800px;
    border: 1px solid var(--border-light);
    margin: 20px auto 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
}

.record:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* 投稿者ステータス */
.data {
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-light);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.data li {
    padding: 0;
    list-style-type: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-secondary);
}

.data li:before {
    content: "&#8226;";
    color: var(--primary-color);
    font-weight: bold;
}

.data li:first-child:before {
    content: "&#128100;";
}

.data li:nth-child(2):before {
    content: "&#128197;";
}

.data li:nth-child(3):before {
    content: "&#11088;";
}

span.line {
    color: var(--border-light);
    margin: 0 10px;
}

/* レビュー内容 */
.contents {
    padding: 0;
}

/* タイトル表示 */
.review_title {
    font-size: 16px;
    font-weight: 600;
    padding: 20px 20px 10px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

/* コメント */
.review_contents {
    padding: 20px;
    position: relative;
}

.review_contents .comment {
    text-align: left;
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 15px;
}

/* 投稿画像 */
.review_contents .img_contents {
    float: right;
    width: 150px;
    margin-left: 20px;
}

.img_box {
    margin: 0 0 10px 0;
    padding: 0;
    text-align: center;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.txt_link {
    text-align: center;
    margin: 5px 0 0 0;
    display: block;
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
}

.txt_link:hover {
    color: var(--accent-color);
}

.img_box img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    padding: 0;
    border: none;
    background: white;
}

.review_contents span {
    width: 150px;
    display: block;
}

/* レビュー返信エリア */
.reply {
    border-top: 2px solid var(--border-light);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.res_top {
    padding: 15px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res_title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.res_title::before {
    content: "&#128172;";
    font-size: 16px;
}

.res_data {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.res_comment {
    margin: 0;
    padding: 15px 20px 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* 件数表示 */
#searchValMore {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 30px auto;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    max-width: 600px;
}

#searchValMore a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 15px 20px;
    font-weight: 600;
    transition: var(--transition);
}

#searchValMore a:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.02);
}

#searchNavi {
    text-align: center;
    margin: 30px 0;
    clear: both;
}

/* 星評価表示 */
.rating-stars {
    display: inline-flex;
    gap: 2px;
    font-size: 16px;
    color: var(--star-color);
}

.rating-stars .star {
    color: var(--star-color);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.rating-stars .star.empty {
    color: var(--border-light);
}

/* フォーム要素 */
input, select, textarea {
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    width: 100%;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* ボタンスタイル */
input[type="submit"],
input[type="button"],
button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
    box-shadow: 0 2px 10px rgba(44, 90, 160, 0.3);
}

input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* float解除 */
.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

.clearfix {
    display: inline-block;
}

/* Mac IE を除外 */
* html .clearfix {
    height: 1%;
}

.clearfix {
    display: block;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .product_box {
        margin: 20px auto;
    }
    
    .pro_img {
        width: 120px;
        margin: 0 15px 15px 0;
    }
    
    .pro_img img {
        height: 120px;
    }
    
    .right_box {
        padding: 15px;
    }
    
    .pro_title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .navi_btn {
        flex-direction: column;
        gap: 8px;
    }
    
    .navi_btn p {
        min-width: auto;
    }
    
    .record {
        margin: 15px auto 20px;
    }
    
    .data {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .review_title {
        padding: 15px;
        font-size: 15px;
    }
    
    .review_contents {
        padding: 15px;
    }
    
    .review_contents .img_contents {
        float: none;
        width: 100%;
        margin: 15px 0 0 0;
    }
    
    .img_box {
        display: inline-block;
        width: 120px;
        margin: 0 10px 10px 0;
    }
    
    .res_top {
        padding: 12px 15px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .res_comment {
        padding: 12px 15px 15px;
    }
}

@media screen and (max-width: 480px) {
    .pro_img {
        width: 100px;
        margin: 0 10px 10px 0;
    }
    
    .pro_img img {
        height: 100px;
    }
    
    .pro_title {
        font-size: 16px;
    }
    
    .navi_btn p a {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .data {
        padding: 10px;
    }
    
    .data li {
        font-size: 13px;
    }
    
    .review_title {
        padding: 12px;
        font-size: 14px;
    }
    
    .review_contents {
        padding: 12px;
    }
    
    .res_comment {
        padding: 10px 12px 12px;
    }
    
    .img_box {
        width: 100px;
        margin: 0 8px 8px 0;
    }
    
    input, select, textarea {
        font-size: 16px; /* iOS zoom prevention */
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.record {
    animation: fadeInUp 0.6s ease-out;
}

.product_box {
    animation: fadeInUp 0.6s ease-out;
}

/* 印刷時の最適化 */
@media print {
    body {
        background: white;
        color: black;
        padding: 0;
    }
    
    .record {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .navi_btn {
        display: none;
    }
    
    .review_title,
    .res_title {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .data {
        background: #f0f0f0 !important;
    }
}