/*
 * page-review.css
 * review.php専用のスタイル（クチコミ）
 * 作成日: 2026-01-29
 */

/* ========================================
   モーダルオーバーレイ
   ======================================== */
.review-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}
.review-modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* ========================================
   モーダルコンテナ
   ======================================== */
.review-modal-container {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   モーダルヘッダー
   ======================================== */
.review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}
.review-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}
.review-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.review-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

/* ========================================
   モーダルボディ
   ======================================== */
.review-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* ========================================
   フォームグループ
   ======================================== */
.review-form-group {
    margin-bottom: 24px;
}
.review-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}
.review-required {
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 500;
}
.review-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.review-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ========================================
   キャスト選択
   ======================================== */
.cast-selector {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}
.cast-search-box {
    position: relative;
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}
.cast-search-box i {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}
.cast-search-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}
.cast-search-input:focus {
    outline: none;
    border-color: #667eea;
}
.cast-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
}
@media (max-width: 480px) {
    .cast-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.cast-card {
    position: relative;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #f8f9fa;
}
.cast-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.cast-card.selected {
    border-color: #667eea;
    background: #f0f3ff;
}
.cast-card.selected .cast-card-check {
    display: flex;
}
.cast-card-image {
    aspect-ratio: 1;
    overflow: hidden;
}
.cast-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cast-card-name {
    padding: 6px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cast-card-check {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: #667eea;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
}
.selected-cast-display {
    padding: 12px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}
.selected-cast-display .no-selection {
    color: #999;
    font-size: 13px;
}
.selected-cast-display .selected-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.selected-cast-display .selected-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.selected-cast-display .selected-info span {
    font-weight: 600;
    color: #667eea;
}

/* ========================================
   星評価
   ======================================== */
.star-rating-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff5cc 100%);
    border-radius: 12px;
    border: 1px solid #ffe066;
}
.star-rating {
    display: flex;
    gap: 8px;
}
.star-rating .star {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
}
.star-rating .star:hover,
.star-rating .star.hover {
    color: #ffc107;
    transform: scale(1.15);
}
.star-rating .star.active {
    color: #ffc107;
}
.star-rating .star.active i {
    font-weight: 900;
}
.star-rating .star.active i:before {
    content: "\f005";
}
.star-rating-text {
    color: #856404;
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   テキストエリア
   ======================================== */
.review-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}
.review-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.textarea-counter {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}
.char-feedback {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
}
.char-feedback.error {
    display: block;
    background: #ffeaea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}
.char-feedback.success {
    display: block;
    background: #e8f5e9;
    color: #27ae60;
    border: 1px solid #c3e6cb;
}
.char-feedback.warning {
    display: block;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ========================================
   モーダルフッター
   ======================================== */
.review-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    border-radius: 0 0 16px 16px;
}
.btn-review-cancel {
    padding: 12px 24px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-review-cancel:hover {
    background: #f0f0f0;
}
.btn-review-submit {
    padding: 12px 28px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-review-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.btn-review-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   隠しフィールド用の非表示スタイル
   ======================================== */
.cast-card.hidden {
    display: none;
}

/* ========================================
   モーダル表示時にヘッダー・フッターを非表示
   ======================================== */
body.review-modal-open .navbar,
body.review-modal-open .navbar-fixed-top,
body.review-modal-open header,
body.review-modal-open .header,
body.review-modal-open .sp_fixed_menu,
body.review-modal-open .fixed-bottom,
body.review-modal-open .footer-fixed,
body.review-modal-open .tel-area,
body.review-modal-open [class*="fixed-bottom"],
body.review-modal-open [class*="sp_fixed"],
body.review-modal-open #header-inc,
body.review-modal-open .shop-info {
    display: none !important;
}

/* ========================================
   クチコミBOX - カード型デザイン
   ======================================== */
.review_box {
    background: #fff !important;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px !important;
    padding: 0 !important;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.review_box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* クチコミ内容部分 */
.review_box .review-content {
    padding: 20px;
}

/* ヘッダー（投稿者情報 + 星） */
.review_box .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.review_box .reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.review_box .reviewer-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.review_box .reviewer-name::before {
    content: "\f007";
    font-family: "FontAwesome";
    color: var(--theme-color, #e91e63);
    margin-right: 8px;
}
.review_box .review-date {
    font-size: 12px;
    color: #999;
}
.review_box .review-stars {
    font-size: 18px;
}
.review_box .review-stars .star {
    color: #ffc107;
}
.review_box .review-stars .star-off {
    color: #ddd;
}

/* クチコミ本文 */
.review_box .review-text p {
    margin: 0;
    color: #444;
    line-height: 1.8;
    font-size: 14px;
}

/* キャスト情報（下部） */
.review_box .review-cast-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #e8e8e8;
}
.review_box .review-cast-info .cast-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    transition: background 0.2s ease;
}
.review_box .review-cast-info .cast-link:hover {
    background: rgba(0,0,0,0.03);
}
.review_box .cast-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    margin-right: 15px;
}
.review_box .cast-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.review_box .cast-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.review_box .cast-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--theme-color, #e91e63);
}
.review_box .cast-name .cast-age {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-left: 4px;
}
.review_box .cast-size {
    font-size: 12px;
    color: #888;
    letter-spacing: 0.5px;
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media (max-width: 767px) {
    .review_box {
        border-radius: 12px;
    }
    .review_box .review-content {
        padding: 15px;
    }
    .review_box .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .review_box .reviewer-name {
        font-size: 14px;
    }
    .review_box .review-stars {
        font-size: 16px;
    }
    .review_box .review-text p {
        font-size: 13px;
    }
    .review_box .review-cast-info .cast-link {
        padding: 12px 15px;
    }
    .review_box .cast-thumb {
        width: 60px;
        height: 60px;
        margin-right: 12px;
    }
    .review_box .cast-name {
        font-size: 14px;
    }
    .review_box .cast-name .cast-age {
        font-size: 12px;
    }
    .review_box .cast-size {
        font-size: 11px;
    }
}
