/**
 * 店舗評価システム - フロントエンド用CSS
 * 機能: レーダーチャートとバーグラフのフロントエンド表示スタイル
 */

/* 基本コンテナ */
.barom-rating-chart {
    margin: 2rem 0;
    padding: 0;
    background: transparent;
    border: none;
}


/* チャートキャンバス */
.barom-rating-chart canvas {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* レーダーチャートの突き抜け表示用（値6がグリッド外に描画されるため） */
.barom-rating-chart.radar-chart {
    overflow: visible;
}

/* 統合表示レイアウト */
.barom-rating-combined {
    margin: 2rem 0;
    padding: 0;
    background: transparent;
    border: none;
}

.barom-rating-combined .charts-container {
    display: block; /* 縦並びにする */
}

/* 統合チャート内の個別チャート */
.barom-rating-combined .barom-rating-chart {
    margin: 0 0 3rem 0;
    background: transparent;
}

.barom-rating-combined .barom-rating-chart:last-child {
    margin-bottom: 0;
}


/* ===== 双極（バー）チャート: フロントエンド用CSS ===== */
.bipolar-preview-container {
    padding: 0;
    background: transparent;
    border: none;
}

.bipolar-scale {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bipolar-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bipolar-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.bipolar-left,
.bipolar-right {
    opacity: 0.8;
    font-weight: 500;
}

.bipolar-track {
    position: relative;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    display: flex;
    align-items: center;
}

.bipolar-markers {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 2px;
}

.bipolar-marker {
    width: 1px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
}

.bipolar-marker.center {
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
}

.bipolar-position {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(-50%);
    width: 18px;
    height: 18px;
    background: #00e676; /* 明るい緑 */
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.bipolar-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* ===== レーダーチャート調査中オーバーレイ ===== */
.radar-chart-wrapper {
    position: relative;
}

.radar-chart-wrapper.is-investigating canvas {
    opacity: 0.2;
}

.radar-investigating-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.radar-investigating-text {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 24px;
    border-radius: 20px;
    letter-spacing: 0.1em;
    margin: 0;
}

/* ===== バイポーラ調査中/測定不能 表示 ===== */
.bipolar-item.is-investigating .bipolar-labels {
    opacity: 0.5;
}

.bipolar-item.is-investigating .bipolar-track {
    background: rgba(255, 255, 255, 0.08);
}

.bipolar-investigating {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 12px;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

/* 測定不能 — 突出感のあるゴールド表示 */
.bipolar-investigating.is-unmeasurable {
    color: rgba(255, 215, 0, 0.95);
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* レスポンシブ調整 */

@media (max-width: 480px) {
    .bipolar-labels {
        font-size: 0.8rem;
    }
}
