@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/**
 * TCG価格比較システム - 追加スタイル
 * 配置場所: /wp-content/themes/cocoon-child/style.css に追記
 */

/* ==================================================
   共通スタイル
   ================================================== */

.tcg-page {
    --tcg-primary: #007bff;
    --tcg-secondary: #6c757d;
    --tcg-success: #28a745;
    --tcg-danger: #dc3545;
    --tcg-warning: #ffc107;
    --tcg-info: #17a2b8;
    --tcg-light: #f8f9fa;
    --tcg-dark: #343a40;
}

/* ==================================================
   エラーコンテナ
   ================================================== */

.tcg-error-container {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================================================
   ランキングコントロール
   ================================================== */

.tcg-ranking-controls {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ranking-type-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ranking-type-btn:hover:not(.loading) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.ranking-type-btn:active {
    transform: translateY(0);
}

/* ==================================================
   ランキングテーブル
   ================================================== */

.tcg-ranking-table-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ranking-row {
    transition: background-color 0.2s ease;
}

.ranking-row:hover {
    background: #f8f9fa !important;
}

/* ==================================================
   統計ボックス
   ================================================== */

.stat-box {
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

/* ==================================================
   ページネーション
   ================================================== */

.page-btn {
    transition: all 0.2s ease;
}

.page-btn:hover {
    transform: scale(1.05);
}

/* ==================================================
   レスポンシブ対応
   ================================================== */

@media (max-width: 768px) {
    .tcg-ranking-controls {
        padding: 15px;
    }
    
    .ranking-type-btn {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    .stat-box {
        padding: 20px !important;
    }
    
    .stat-box > div:first-child {
        font-size: 12px !important;
    }
    
    .stat-box > div:last-child {
        font-size: 22px !important;
    }
}

@media (max-width: 480px) {
    .tcg-ranking-controls {
        padding: 10px;
    }
    
    .ranking-type-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* ==================================================
   ローディングアニメーション
   ================================================== */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--tcg-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* ==================================================
   印刷用スタイル
   ================================================== */

@media print {
    .tcg-ranking-controls,
    .tcg-advertisement,
    .tcg-rakuten-section {
        display: none !important;
    }
    
    .tcg-ranking-table-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .ranking-row {
        page-break-inside: avoid;
    }
}

/* ==================================================
   アクセシビリティ
   ================================================== */

.ranking-type-btn:focus,
.period-select:focus,
.metric-select:focus,
.option-select:focus {
    outline: 3px solid var(--tcg-primary);
    outline-offset: 2px;
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    .tcg-ranking-controls {
        border: 2px solid #000;
    }
    
    .ranking-type-btn {
        border: 2px solid #000;
    }
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
    .tcg-page {
        --tcg-light: #343a40;
        --tcg-dark: #f8f9fa;
    }
    
    .tcg-ranking-controls,
    .tcg-ranking-table-container {
        background: #2b2b2b;
        color: #e0e0e0;
    }
    
    .ranking-row:hover {
        background: #3a3a3a !important;
    }
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}