/*
 * ===================================================================
 * 月別歩数アニメーション棒グラフ 固有スタイル
 * /css/my-monthly-steps-chart.css
 * (共通スタイル分離後・最終修正版)
 *
 * 共通スタイルは common-chart-styles.css で定義されています。
 * ===================================================================
 */

/*
 * -------------------------------------------------------------------
 * 1. SVG内の各要素のスタイル
 * -------------------------------------------------------------------
 */

.monthly-steps-chart-area .x-axis path,
.monthly-steps-chart-area .x-axis line,
.monthly-steps-chart-area .y-axis path,
.monthly-steps-chart-area .y-axis line {
    stroke: #ccc;
}

.monthly-steps-chart-area .x-axis text,
.monthly-steps-chart-area .y-axis text {
    fill: #555;
    font-size: 1.0em;
    /* デフォルト状態（広い画面）のスタイルを明示 */
    text-anchor: middle;
    transform: none;
    transition: transform 0.3s ease, text-anchor 0.3s ease; /* アニメーション効果を追加 */
}

/* Y軸の目盛りテキストの位置を調整 */
.monthly-steps-chart-area .y-axis .tick text {
    text-anchor: end; /* テキストを右揃えにして、軸線の左側に配置 */
    /* 軸線との間に少し余白（パディング）を持たせる */
    transform: translateX(-5px);
}

/* ★★★【ここが修正箇所です】★★★ */
/* JSが付与する .is-narrow クラスを持つ場合のスタイル */
.monthly-steps-chart-area .x-axis.is-narrow .tick text {
    text-anchor: end;
    /* 回転させた後、位置を微調整する */
    transform: rotate(-45deg) translate(-6px, -4px);
}


.monthly-steps-chart-area .bar {
    transition: opacity 0.2s ease-in-out;
}

.monthly-steps-chart-area .bar:hover {
    opacity: 0.8;
}

.monthly-steps-chart-area .bar-label {
    font-size: 0.7em;
    font-weight: bold;
    fill: #333;
    text-anchor: middle;
}

.monthly-steps-chart-area .chart-timer {
    font-size: 2.2em;
    font-weight: bold;
    fill: #4A5568;
    opacity: 0.8;
    text-anchor: end;
}


/*
 * -------------------------------------------------------------------
 * 2. コントロールUI (再生ボタン、スライダー) のスタイル
 * -------------------------------------------------------------------
 */

.monthly-steps-chart-container .chart-controls-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px 5px 80px;
    gap: 20px;
    margin-top: 15px;
}

.playback-controls .control-button {
    background-color: #4a5568;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 16px;
}

.playback-controls .control-button:hover {
    background-color: #2d3748;
}

.playback-controls .pause-icon { display: none; }
.playback-controls .play-icon { display: inline; margin-left: 3px; }

.monthly-steps-chart-container.is-playing .playback-controls .play-icon { display: none; }
.monthly-steps-chart-container.is-playing .playback-controls .pause-icon { display: inline; }

.slider-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-container .slider-label {
    font-size: 0.9em;
    color: #4a5568;
}

.slider-container .month-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 5px;
    outline: none;
    opacity: 0.8;
    transition: opacity .2s;
}

.slider-container .month-slider:hover { opacity: 1; }

.slider-container .month-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #38b2ac;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.slider-container .month-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #38b2ac;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.slider-container .slider-value-display {
    font-size: 0.9em;
    font-weight: bold;
    color: #2c7a7b;
    min-width: 80px;
    text-align: center;
}