/* 配当ダッシュボード専用CSS */
.unified-dividend-dashboard,
.enhanced-dividend-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    padding: 20px;
}

.section-title {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
}

.dividend-trend-section,
.payout-trend-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.chart-container {
    margin-bottom: 40px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.chart-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-height: 400px;
    overflow: visible;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Plotly.jsチャートの高さ制御 - 重要！ */
.chart-wrapper div[id*="Chart"] {
    min-height: 400px !important;
    height: 400px !important;
    width: 100% !important;
    display: block !important;
    position: relative !important;
    z-index: 20 !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* チャート要素の強制表示 - 適切な優先度 */
#dividendChart, #payoutChart {
    display: block !important;
    min-height: 400px !important;
    max-height: 500px !important;
    width: 100% !important;
    height: 400px !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 20 !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
}

/* 最新期テーブルと過去実績テーブルの間隔 */
.dividend-table + .dividend-table {
    margin-top: 20px;
}

/* 最新期テーブルの特別なスタイリング */
.forecast-table {
    border: 2px solid #e74c3c;
}

.forecast-table th:first-child {
    background: #2c3e50;
    color: white;
    font-weight: bold;
}

.forecast-table th:nth-child(2) {
    background: #2c3e50 !important;
    color: white !important;
    font-weight: bold;
}

/* 過去実績テーブルのスタイリング */
.historical-table {
    border: 1px solid #dee2e6;
}

.dividend-table,
.payout-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.dividend-table th,
.payout-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    border: none;
}

.dividend-table td,
.payout-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
}

/* 金額・パーセンテージのセルは右寄せ */
.dividend-table td:nth-child(2),
.dividend-table td:nth-child(3),
.dividend-table td:nth-child(4),
.dividend-table td:nth-child(5),
.dividend-table td:nth-child(6),
.dividend-table td:nth-child(7),
.payout-table td:nth-child(2),
.payout-table td:nth-child(3) {
    text-align: right;
}

.dividend-table tr:hover,
.payout-table tr:hover {
    background: #f8f9fa;
}

.table-note {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
    font-size: 0.9em;
    text-align: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .unified-dividend-dashboard,
    .enhanced-dividend-dashboard {
        padding: 10px;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.unified-dividend-dashboard > *,
.enhanced-dividend-dashboard > * {
    animation: fadeInUp 0.6s ease-out;
}

.unified-dividend-dashboard > *:nth-child(1),
.enhanced-dividend-dashboard > *:nth-child(1) {
    animation-delay: 0.1s;
}

.unified-dividend-dashboard > *:nth-child(2),
.enhanced-dividend-dashboard > *:nth-child(2) {
    animation-delay: 0.2s;
}

/* テーブルのアニメーション */
.dividend-table,
.payout-table {
    animation: slideInLeft 0.8s ease-out;
}

.forecast-table {
    animation: slideInRight 0.8s ease-out 0.3s both;
}

.historical-table {
    animation: slideInLeft 0.8s ease-out 0.6s both;
}