/**
 * 買取価格推移グラフ用スタイル
 */

.price-graph-wrapper {
    margin-top: 20px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.graph-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* グラフ表示ボタン */
.show-graph-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.show-graph-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.show-graph-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.show-graph-btn .btn-icon {
    font-size: 20px;
}

/* 期間選択UI */
.period-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    flex-wrap: wrap;
}

.period-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.period-icon {
    font-size: 18px;
}

.period-select {
    padding: 8px 12px;
    border: 2px solid #667eea;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-select:hover {
    border-color: #764ba2;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.period-select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.member-badge {
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.member-badge-active {
    animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
    }
}

/* 一般ユーザー向け期間選択UI */
.period-selector-guest {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    flex-direction: column;
    align-items: stretch;
}

.period-upgrade-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border-left: 3px solid #ff9800;
}

.upgrade-message-content {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.upgrade-icon {
    font-size: 18px;
}

.upgrade-text {
    font-size: 13px;
    font-weight: 600;
    color: #e65100;
}

.salon-join-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
}

.salon-join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
    color: white;
    text-decoration: none;
}

.salon-join-btn:active {
    transform: translateY(0);
}

.join-icon {
    font-size: 16px;
}

/* グラフコンテンツエリア */
.graph-content {
    margin-top: 20px;
}

/* ローディング表示 */
.graph-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 8px;
}

.loading-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 60px;
    margin-bottom: 24px;
}

.loading-bar {
    width: 6px;
    height: 40px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    animation: loading-wave 1.2s ease-in-out infinite;
}

.loading-bar:nth-child(1) {
    animation-delay: 0s;
}

.loading-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.loading-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.loading-bar:nth-child(4) {
    animation-delay: 0.3s;
}

.loading-bar:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes loading-wave {
    0%, 100% {
        transform: scaleY(0.5);
        opacity: 0.5;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.loading-text {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
    animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.loading-hint {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

/* チャートコンテナ */
.chart-container {
    width: 100%;
    min-height: 450px;
}

/* エラー表示 */
.graph-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: #fff5f5;
    border-radius: 8px;
    border: 1px solid #feb2b2;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-message {
    font-size: 18px;
    font-weight: 600;
    color: #c53030;
    margin-bottom: 8px;
}

.error-hint {
    font-size: 14px;
    color: #e53e3e;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .price-graph-wrapper {
        padding: 15px;
    }

    .graph-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .show-graph-btn {
        width: 100%;
        justify-content: center;
        font-size: 15px;
        padding: 10px 20px;
    }

    .graph-header h3 {
        font-size: 16px;
    }

    .loading-text {
        font-size: 16px;
    }

    .loading-hint {
        font-size: 13px;
    }

    .loading-bar {
        width: 5px;
        height: 35px;
    }

    .chart-container {
        min-height: 350px;
    }

    /* 期間選択UIのモバイル対応 */
    .period-selector {
        padding: 10px 12px;
        gap: 8px;
    }

    .period-label {
        font-size: 13px;
    }

    .period-select {
        font-size: 13px;
        padding: 6px 10px;
    }

    .member-badge {
        font-size: 11px;
        padding: 5px 10px;
        width: 100%;
        text-align: center;
    }

    /* 一般ユーザー向けUIのモバイル対応 */
    .period-selector-guest {
        flex-direction: column;
        align-items: stretch;
    }

    .period-upgrade-message {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .upgrade-message-content {
        width: 100%;
    }

    .upgrade-text {
        font-size: 12px;
    }

    .salon-join-btn {
        width: 100%;
        justify-content: center;
        font-size: 13px;
        padding: 10px 12px;
        box-sizing: border-box;
    }
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1024px) {
    .chart-container {
        min-height: 400px;
    }
}

/* ApexChartsのツールバーカスタマイズ */
.apexcharts-toolbar {
    z-index: 10 !important;
}

/* グラフ内のテキストを読みやすく */
.apexcharts-text {
    font-family: inherit;
}
