/* Bing Webmaster Tools ビューア専用テーマ（ライト + Bing カラー） */

body:has(#bing-app) {
    background: #eef7fc;
    color: #0b253a;
}

#bing-app {
    --bg: #eef7fc;
    --bg-elevated: #ffffff;
    --sidebar-bg: #0b253a;
    --sidebar-bg-hover: #133b5c;
    --sidebar-border: rgba(255, 255, 255, 0.1);
    --sidebar-text: #e8f4fc;
    --sidebar-muted: #8eb4cc;
    --text: #0b253a;
    --text-muted: #5a7d94;
    --border: #d4e8f4;
    --border-strong: #b8d9ec;
    --accent: #00aeef;
    --accent-hover: #0099d4;
    --accent-soft: #e6f7fd;
    --accent-glow: rgba(0, 174, 239, 0.22);
    --shadow-sm: 0 1px 2px rgba(11, 37, 58, 0.06);
    --shadow-md: 0 4px 16px rgba(11, 37, 58, 0.08);
    --shadow-lg: 0 12px 40px rgba(11, 37, 58, 0.1);
}

/* トップバー */
#bing-app .gsc-topbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: var(--border);
}

#bing-app .gsc-topbar__logo {
    background: linear-gradient(135deg, #00aeef 0%, #0078d4 100%);
    box-shadow: 0 4px 12px var(--accent-glow);
}

#bing-app .gsc-icon-btn:hover {
    background: #e6f7fd;
}

#bing-app .gsc-login-card {
    width: min(100%, 520px);
    padding: 36px 36px 32px;
}

#bing-app .gsc-login-card__text {
    margin-bottom: 20px;
}

#bing-app .gsc-login-card__oauth-retry {
    margin: 0 0 20px;
    padding: 12px 14px;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #0b5f7a;
    text-align: left;
    background: var(--accent-soft);
    border: 1px solid #9fe3f9;
    border-radius: var(--radius-md, 8px);
}

#bing-app .gsc-login-card__google-switch {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: left;
}

#bing-app .gsc-login-card__hint-text {
    display: block;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.55;
}

#bing-app .gsc-topbar__user-avatar {
    background: var(--accent-soft);
    color: var(--accent);
}

/* サイドバー（Bing ネイビー） */
#bing-app .gsc-nav__item.is-active {
    background: rgba(0, 174, 239, 0.18);
    color: #fff;
}

#bing-app .gsc-nav__item.is-active svg {
    color: #00aeef;
}

#bing-app .gsc-input:focus,
#bing-app .gsc-select:focus {
    border-color: rgba(0, 174, 239, 0.65);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.18);
}

#bing-app .gsc-preset-btn.is-active {
    border-color: rgba(0, 174, 239, 0.55);
    background: rgba(0, 174, 239, 0.16);
    color: #fff;
}

/* ボタン */
#bing-app .gsc-btn--primary {
    background: linear-gradient(135deg, #00aeef 0%, #0088c7 100%);
    color: #fff;
}

#bing-app .gsc-sidebar .gsc-btn--primary {
    background: linear-gradient(135deg, #00aeef 0%, #0078d4 100%);
}

#bing-app .gsc-btn.is-active {
    border-color: rgba(0, 174, 239, 0.45);
    color: #0088c7;
    background: var(--accent-soft);
}

#bing-app .gsc-btn--ghost:not(:disabled):hover {
    background: #e6f7fd;
}

/* ログイン */
#bing-app .gsc-login-card::before {
    background: linear-gradient(90deg, #00aeef, #0078d4, #00aeef);
}

#bing-app .gsc-login-card__icon {
    background: var(--accent-soft);
    color: var(--accent);
}

/* サマリー */
#bing-app .gsc-summary__card--clicks {
    --card-accent: #00aeef;
}

#bing-app .gsc-summary__card--impressions {
    --card-accent: #0078d4;
}

#bing-app .gsc-summary__card--ctr {
    --card-accent: #059669;
}

#bing-app .gsc-summary__card--position {
    --card-accent: #133b5c;
}

#bing-app .gsc-compare-preview {
    color: #0088c7;
}

/* チャート */
#bing-app .gsc-chart-granularity-btn.is-active,
#bing-app .gsc-chart-display-btn.is-active,
#bing-app .gsc-chart-metric-btn.is-active {
    color: var(--accent);
}

#bing-app .gsc-chart-card {
    background: #f7fcff;
    border-color: var(--border);
}

#bing-app .gsc-query-context__chip.is-accent {
    background: var(--accent-soft);
}

#bing-app .gsc-query-context__chip.is-accent .gsc-query-context__chip-value {
    color: #0088c7;
}

/* テーブル */
#bing-app .gsc-table tbody tr:hover {
    background: #e6f7fd;
}

#bing-app .gsc-table tbody tr:nth-child(even) {
    background: #f7fcff;
}

#bing-app .gsc-table tbody tr:nth-child(even):hover {
    background: #dff3fc;
}

#bing-app .gsc-table th.is-sorted {
    color: var(--accent);
}

#bing-app .gsc-table-data-notice__item.is-info {
    background: var(--accent-soft);
    border-color: #9fe3f9;
    color: #0b5f7a;
}

/* 保存ビュー */
#bing-app .gsc-saved-item:hover {
    border-color: rgba(0, 174, 239, 0.4);
    background: #f7fcff;
}

#bing-app .gsc-page-footer__links a:hover {
    color: var(--accent);
}

/* ツール切替（Bing アクティブ色） */
#bing-app .gsc-tool-switcher {
    background: #e6f7fd;
    border-color: #d4e8f4;
}

#bing-app .gsc-tool-switcher__item.is-active {
    color: #00aeef;
}
