/**
 * RK Campaign Matrix - Table Styles (CRITICAL: White Base / High Contrast)
 * 
 * 完全に白ベースで、あらゆる環境で視認性を確保するためのスタイル。
 * キャッシュ対策のためバージョンアップ推奨。
 */

#rk-campaign-matrix-wrap {
    background: #ffffff !important;
    color: #111827 !important;
}

#rk-campaign-matrix-wrap.matrix-container {
    margin: 2rem 0;
    background: #ffffff !important;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    overflow-x: auto;
}

#rk-campaign-matrix-wrap h2 {
    color: #111827 !important;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800;900&display=swap');

#rk-campaign-matrix-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#rk-campaign-matrix-wrap .matrix-table {
    font-size: 0.85rem;
    width: 100%;
    border-collapse: collapse;
    background: #ffffff !important;
    color: #111827 !important;
}

#rk-campaign-matrix-wrap .matrix-table th,
#rk-campaign-matrix-wrap .matrix-table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #e5e7eb !important;
    color: #111827 !important;
}

/* Header Styles: Bright White with Underlines */
#rk-campaign-matrix-wrap .matrix-table thead th {
    background: #fdfdfd !important;
    color: #374151 !important;
    font-weight: 700;
    font-size: 0.75rem;
    border-bottom: 2px solid #374151 !important;
}

/* 特定項目の強調（緑色と下線） */
#rk-campaign-matrix-wrap .th-check {
    color: #059669 !important; /* 明確な緑 */
    border-bottom: 4px solid #059669 !important;
    background: #f0fdf4 !important; /* 極めて薄い緑の背景 */
}

/* Section Header: Dark Gray with Green Text */
#rk-campaign-matrix-wrap .matrix-section-header {
    background: #374151 !important;
    color: #00f2b1 !important;
    text-align: left !important;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 12px 15px !important;
}

/* Tags (Circles) */
#rk-campaign-matrix-wrap .matrix-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.8rem;
}
#rk-campaign-matrix-wrap .matrix-tag.ok { color: #10b981; border: 2px solid #10b981; }
#rk-campaign-matrix-wrap .matrix-tag.fail { color: #ef4444; border: 2px solid #ef4444; }

/* Data Content Visibility */
#rk-campaign-matrix-wrap .rk-cell-mult {
    font-weight: 800 !important;
    color: #111827 !important;
}

#rk-campaign-matrix-wrap .count-badge {
    background: #111827;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

#rk-campaign-matrix-wrap .badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Keyframes (Sync with v6) */
@keyframes rk-v6-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -100% 0; } }
@keyframes rk-v6-glow { 0%,100% { box-shadow:0 0 6px rgba(245,213,90,0.3), inset 0 0 2px rgba(255,255,255,0.2); } 50% { box-shadow:0 0 15px rgba(245,213,90,0.7), inset 0 0 5px rgba(255,255,255,0.4); } }

/* Recommendation Ranks (GLOBALIZED to bypass HTML cache) */
.rank-SUM { 
    background: linear-gradient(110deg, #d4af37 0%, #000 33%, #991b1b 66%, #d4af37 100%) !important; 
    background-size: 300% 100% !important; 
    border: 2px solid #d4af37 !important;
    animation: rk-v6-shimmer 3s linear infinite, rk-v6-glow 2s ease-in-out infinite !important;
    box-shadow: 0 0 15px rgba(185, 28, 28, 0.6), inset 0 0 10px rgba(0,0,0,0.5) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    display: inline-block !important;
}
.rank-SUM span {
    background: linear-gradient(110deg, #fff9ba 0%, #d4af37 50%, #fff9ba 100%) !important;
    background-size: 300% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation: rk-v6-shimmer 1.5s linear infinite !important;
    font-weight: 900 !important;
    text-shadow: none !important;
}

.rank-ULTIMATE { 
    background: linear-gradient(170deg,#f5d55a 0%,#fff9ba 20%,#f8e08a 50%,#fff9ba 80%,#c9952a 100%) !important; 
    border: 1px solid #d4af37 !important;
    animation: rk-v6-glow 2s ease-in-out infinite !important;
    box-shadow: 0 0 12px rgba(245,213,90,0.5) !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    display: inline-block !important;
}
.rank-ULTIMATE span {
    background: linear-gradient(110deg,#000 20%,#444 50%,#000 80%) !important;
    background-size: 300% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation: rk-v6-shimmer 2s linear infinite !important;
}

#rk-campaign-matrix-wrap .rank-PRIME, .rank-PRIME { background: linear-gradient(170deg,#bdc3c7 0%,#fdfdfd 50%,#bdc3c7 100%) !important; color: #111 !important; border: 1px solid #9ca3af !important; }
#rk-campaign-matrix-wrap .rank-SMART, .rank-SMART { background: #2563eb !important; color: #ffffff !important; }

#rk-campaign-matrix-wrap .strategy-cell {
    text-align: left !important;
    font-size: 0.7rem;
    color: #4b5563 !important;
    max-width: 320px;
    line-height: 1.4;
}
