/**
 * JMP Theme (Dark/Light) - HC Joyn Divine Light Beam
 * /var/www/html/wp-content/docs/Joyn 디자인 가이드 기반
 *
 * @package JMP
 * @since 1.6.0
 */

/* =========================================================
   Theme Toggle Button - Compact & Simple (대시보드 기준 통일)
   모든 페이지(프로필·프론트엔드)에서 동일한 모양·크기
   ========================================================= */
/* 통일 크기: 트랙 높이 26px, 버튼 22px (다른 CSS 오버라이드 방지) */
.jmp-theme-toggle,
.acts-public-wrap .jmp-theme-toggle,
.acts-public-wrap .header-actions .jmp-theme-toggle,
.acts-dashboard-wrap .jmp-theme-toggle,
.acts-dashboard-wrap .header-actions .jmp-theme-toggle,
.acts-application-wrap .jmp-theme-toggle,
.acts-application-wrap .header-actions .jmp-theme-toggle,
.acts-application-wrap .hero .jmp-theme-toggle,
.acts-public-wrap .hero .jmp-theme-toggle,
.acts-profile-wrap .jmp-theme-toggle,
.acts-profile-theme-inline .jmp-theme-toggle,
.acts-minister-profile .jmp-theme-toggle,
.acts-theme-toggle-wrap .jmp-theme-toggle,
.jmp-mypage-theme-toggle-wrap .jmp-theme-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 1px;
    padding: 2px;
    height: 26px !important;
    min-height: 26px !important;
    background: rgba(62, 64, 75, 0.6);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}
.jmp-theme-toggle [data-theme],
.acts-public-wrap .jmp-theme-toggle [data-theme],
.acts-public-wrap .header-actions .jmp-theme-toggle [data-theme],
.acts-dashboard-wrap .jmp-theme-toggle [data-theme],
.acts-application-wrap .jmp-theme-toggle [data-theme],
.acts-application-wrap .hero .jmp-theme-toggle [data-theme],
.acts-public-wrap .hero .jmp-theme-toggle [data-theme],
.acts-profile-wrap .jmp-theme-toggle [data-theme],
.acts-profile-theme-inline .jmp-theme-toggle [data-theme],
.acts-minister-profile .jmp-theme-toggle [data-theme],
.acts-theme-toggle-wrap .jmp-theme-toggle [data-theme],
.jmp-mypage-theme-toggle-wrap .jmp-theme-toggle [data-theme] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    font-size: 14px !important;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.jmp-theme-toggle [data-theme] i {
    font-size: 1em !important;
}
.jmp-theme-toggle [data-theme]:hover,
.acts-public-wrap .jmp-theme-toggle [data-theme]:hover,
.acts-dashboard-wrap .jmp-theme-toggle [data-theme]:hover,
.acts-profile-wrap .jmp-theme-toggle [data-theme]:hover,
.acts-minister-profile .jmp-theme-toggle [data-theme]:hover {
    color: rgba(255, 255, 255, 0.8);
}
.jmp-theme-toggle [data-theme].active,
.acts-public-wrap .jmp-theme-toggle [data-theme].active,
.acts-dashboard-wrap .jmp-theme-toggle [data-theme].active,
.acts-profile-wrap .jmp-theme-toggle [data-theme].active,
.acts-minister-profile .jmp-theme-toggle [data-theme].active {
    background: var(--brand, var(--acts-gold, #c9a84c));
    color: #06060a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Light theme - 트랙: 골드 오렌지, 활성: 흰색 스위치 + 그림자 */
.theme-light .jmp-theme-toggle,
.jmp-theme-root.theme-light .jmp-theme-toggle,
.acts-dashboard-wrap.theme-light .jmp-theme-toggle,
.acts-application-wrap.theme-light .jmp-theme-toggle,
.acts-public-wrap.theme-light .jmp-theme-toggle,
.acts-public-wrap.theme-light .header-actions .jmp-theme-toggle,
.acts-minister-profile.theme-light .jmp-theme-toggle {
    background: linear-gradient(145deg, #f0a830 0%, #e09b24 100%) !important;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}
.theme-light .jmp-theme-toggle [data-theme],
.jmp-theme-root.theme-light .jmp-theme-toggle [data-theme],
.acts-dashboard-wrap.theme-light .jmp-theme-toggle [data-theme],
.acts-application-wrap.theme-light .jmp-theme-toggle [data-theme],
.acts-public-wrap.theme-light .jmp-theme-toggle [data-theme],
.acts-public-wrap.theme-light .header-actions .jmp-theme-toggle [data-theme],
.acts-minister-profile.theme-light .jmp-theme-toggle [data-theme] {
    color: rgba(255, 255, 255, 0.7);
}
.theme-light .jmp-theme-toggle [data-theme]:hover,
.jmp-theme-root.theme-light .jmp-theme-toggle [data-theme]:hover,
.acts-dashboard-wrap.theme-light .jmp-theme-toggle [data-theme]:hover,
.acts-application-wrap.theme-light .jmp-theme-toggle [data-theme]:hover,
.acts-public-wrap.theme-light .jmp-theme-toggle [data-theme]:hover,
.acts-public-wrap.theme-light .header-actions .jmp-theme-toggle [data-theme]:hover,
.acts-minister-profile.theme-light .jmp-theme-toggle [data-theme]:hover {
    color: rgba(255, 255, 255, 0.95);
}
.theme-light .jmp-theme-toggle [data-theme].active,
.jmp-theme-root.theme-light .jmp-theme-toggle [data-theme].active,
.acts-dashboard-wrap.theme-light .jmp-theme-toggle [data-theme].active,
.acts-application-wrap.theme-light .jmp-theme-toggle [data-theme].active,
.acts-public-wrap.theme-light .jmp-theme-toggle [data-theme].active,
.acts-public-wrap.theme-light .header-actions .jmp-theme-toggle [data-theme].active,
.acts-minister-profile.theme-light .jmp-theme-toggle [data-theme].active {
    background: #ffffff !important;
    color: #e09b24;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   Dark Theme Tokens (HC Joyn Divine Light Beam)
   다크 모드: 일반 텍스트는 #ffffff (가독성 향상)
   ========================================================= */
.jmp-theme-root.theme-dark,
.jmp-mypage-wrapper.theme-dark,
.acts-dashboard-wrap.theme-dark,
.acts-application-wrap.theme-dark,
.acts-public-wrap.theme-dark,
.acts-profile-wrap.theme-dark {
    --profile-hero-bg: radial-gradient(ellipse 130% 90% at 50% 15%, #1a1040 0%, #100a24 30%, #06060a 65%);
}
.acts-profile-wrap.theme-dark,
.acts-leaderboard-wrap.theme-dark,
.acts-team-wrap.theme-dark,
.acts-ministers-wrap.theme-dark,
.acts-badges-wrap.theme-dark,
.acts-minister-profile.theme-dark,
.acts-my-team-widget.theme-dark {
    --brand: #c9a84c;
    --brand-light: #e8d48b;
    --brand-dark: #a88b3a;
    --brand-glow: rgba(201, 168, 76, 0.12);

    --bg-root: #06060a;
    --bg-1: #0a0a10;
    --bg-2: #0e0e16;
    --bg-3: #16161f;
    --bg-4: #1e1e2a;
    --bg-card: #0f0f1a;
    --bg-card-hover: #13131f;
    --bg-input: #0c0c14;
    --bg-glass: rgba(15, 15, 26, 0.75);

    /* 일반 텍스트(본문, 제목 등): 흰색 - 가독성 향상 */
    --text-1: #ffffff;
    --text-2: #b0aaa0;
    --text-3: #706a60;

    --border-1: rgba(201, 168, 76, 0.18);
    --border-2: rgba(255, 255, 255, 0.06);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 1px rgba(201, 168, 76, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 2px rgba(201, 168, 76, 0.08);
}

/* =========================================================
   Light Theme Tokens
   ========================================================= */
.jmp-theme-root.theme-light,
.jmp-mypage-wrapper.theme-light,
.acts-dashboard-wrap.theme-light,
.acts-application-wrap.theme-light,
.acts-public-wrap.theme-light,
.acts-profile-wrap.theme-light {
    --profile-hero-bg: linear-gradient(135deg, #e5e2da 0%, #d9d5cc 100%);
}
.acts-profile-wrap.theme-light,
.acts-leaderboard-wrap.theme-light,
.acts-team-wrap.theme-light,
.acts-ministers-wrap.theme-light,
.acts-badges-wrap.theme-light,
.acts-minister-profile.theme-light,
.acts-my-team-widget.theme-light {
    --brand: #9e7c24;
    --brand-light: #c4a044;
    --brand-dark: #7b6018;
    --brand-glow: rgba(158, 124, 36, 0.12);

    --bg-root: #f4f1eb;
    --bg-1: #edeae3;
    --bg-2: #e5e2da;
    --bg-3: #d9d5cc;
    --bg-4: #cbc7bd;
    --bg-card: #ffffff;
    --bg-card-hover: #fdfcfa;
    --bg-input: #f8f6f2;
    --bg-glass: rgba(255, 255, 255, 0.90);

    --text-1: #1a1814;
    --text-2: #57524a;
    --text-3: #908a80;

    --border-1: rgba(158, 124, 36, 0.28);
    --border-2: rgba(28, 24, 20, 0.08);

    --shadow-sm: 0 1px 3px rgba(28, 24, 20, 0.06);
    --shadow-md: 0 4px 12px rgba(28, 24, 20, 0.08);
    --shadow-lg: 0 10px 25px rgba(28, 24, 20, 0.10);

    background: var(--bg-root);
    color: var(--text-1);
}

/* Acts 다크 모드 배경·텍스트 적용 */
.jmp-theme-root.theme-dark,
.jmp-mypage-wrapper.theme-dark,
.acts-dashboard-wrap.theme-dark,
.acts-application-wrap.theme-dark,
.acts-public-wrap.theme-dark,
.acts-profile-wrap.theme-dark,
.acts-leaderboard-wrap.theme-dark,
.acts-team-wrap.theme-dark,
.acts-ministers-wrap.theme-dark,
.acts-badges-wrap.theme-dark,
.acts-minister-profile.theme-dark,
.acts-my-team-widget.theme-dark {
    background: var(--bg-root);
    color: var(--text-1);
}

/* Acts Dashboard/Application 라이트 모드 변수 매핑 */
.acts-dashboard-wrap.theme-light,
.acts-application-wrap.theme-light,
.acts-public-wrap.theme-light,
.acts-minister-profile.theme-light {
    --acts-bg: var(--bg-root);
    --acts-surface: var(--bg-card);
    --acts-surface-hover: var(--bg-card-hover);
    --acts-text: var(--text-1);
    --acts-text-dim: var(--text-2);
    --acts-text-muted: var(--text-3);
    --acts-border: var(--border-2);
    --acts-navy: var(--bg-2);
    --acts-navy-light: var(--bg-3);
    --acts-navy-mid: var(--bg-4);
}

/* =========================================================
   Dark Theme - 일반 텍스트 흰색 강제
   (라벨텍스트 .form-label 등은 --text-2 유지)
   ========================================================= */
.jmp-theme-root.theme-dark p,
.jmp-theme-root.theme-dark span:not(.form-label):not(label),
.jmp-theme-root.theme-dark td,
.jmp-theme-root.theme-dark li,
.jmp-theme-root.theme-dark div:not([class*="label"]):not(.form-label),
.jmp-mypage-wrapper.theme-dark p,
.jmp-mypage-wrapper.theme-dark span:not(.form-label):not(label),
.jmp-mypage-wrapper.theme-dark td,
.jmp-mypage-wrapper.theme-dark li,
.acts-dashboard-wrap.theme-dark p,
.acts-dashboard-wrap.theme-dark span:not(.form-label):not(label),
.acts-dashboard-wrap.theme-dark td,
.acts-dashboard-wrap.theme-dark li,
.acts-dashboard-wrap.theme-dark .hero-greeting,
.acts-dashboard-wrap.theme-dark .hero-meta,
.acts-dashboard-wrap.theme-dark .nav-breadcrumb,
.acts-dashboard-wrap.theme-dark .dash-stat-value,
.acts-dashboard-wrap.theme-dark .dash-stat-label,
.acts-dashboard-wrap.theme-dark .card-title,
.acts-dashboard-wrap.theme-dark .card-desc,
.acts-application-wrap.theme-dark p,
.acts-application-wrap.theme-dark span:not(.form-label):not(label),
.acts-application-wrap.theme-dark td,
.acts-application-wrap.theme-dark li,
.acts-public-wrap.theme-dark p,
.acts-public-wrap.theme-dark span:not(.form-label):not(label),
.acts-public-wrap.theme-dark td,
.acts-public-wrap.theme-dark li,
.acts-public-wrap.theme-dark .stat-value,
.acts-public-wrap.theme-dark .stat-label,
.acts-profile-wrap.theme-dark p,
.acts-profile-wrap.theme-dark span:not(.form-label):not(label),
.acts-profile-wrap.theme-dark td,
.acts-profile-wrap.theme-dark li,
.acts-leaderboard-wrap.theme-dark p,
.acts-leaderboard-wrap.theme-dark span:not(.form-label):not(label),
.acts-leaderboard-wrap.theme-dark td,
.acts-leaderboard-wrap.theme-dark li,
.acts-leaderboard-wrap.theme-dark .acts-lb-name,
.acts-leaderboard-wrap.theme-dark .acts-lb-meta,
.acts-leaderboard-wrap.theme-dark .acts-lb-score-main,
.acts-team-wrap.theme-dark p,
.acts-team-wrap.theme-dark span:not(.form-label):not(label),
.acts-team-wrap.theme-dark td,
.acts-team-wrap.theme-dark li,
.acts-ministers-wrap.theme-dark p,
.acts-ministers-wrap.theme-dark span:not(.form-label):not(label),
.acts-ministers-wrap.theme-dark td,
.acts-ministers-wrap.theme-dark li,
.acts-badges-wrap.theme-dark p,
.acts-badges-wrap.theme-dark span:not(.form-label):not(label),
.acts-badges-wrap.theme-dark td,
.acts-badges-wrap.theme-dark li,
.acts-minister-profile.theme-dark p,
.acts-minister-profile.theme-dark span:not(.form-label):not(label),
.acts-minister-profile.theme-dark td,
.acts-minister-profile.theme-dark li {
    color: var(--text-1);
}

/* Acts-specific: hero-name, card-title 등 제목/본문 */
.acts-dashboard-wrap.theme-dark .hero-name,
.acts-dashboard-wrap.theme-dark .hero-name .acts-tag,
.acts-dashboard-wrap.theme-dark h1,
.acts-dashboard-wrap.theme-dark h2,
.acts-dashboard-wrap.theme-dark h3,
.acts-dashboard-wrap.theme-dark .card-title,
.acts-application-wrap.theme-dark h1,
.acts-application-wrap.theme-dark h2,
.acts-application-wrap.theme-dark h3,
.acts-application-wrap.theme-dark .section-title h2,
.acts-public-wrap.theme-dark h1,
.acts-public-wrap.theme-dark h2,
.acts-public-wrap.theme-dark h3,
.acts-public-wrap.theme-dark .stat-value,
.acts-public-wrap.theme-dark .minister-card-name,
.acts-public-wrap.theme-dark .minister-name,
.acts-public-wrap.theme-dark .minister-card .minister-name-link,
.acts-profile-wrap.theme-dark h1,
.acts-profile-wrap.theme-dark h2,
.acts-profile-wrap.theme-dark h3,
.acts-leaderboard-wrap.theme-dark .acts-lb-name,
.acts-leaderboard-wrap.theme-dark .acts-lb-score-main,
.acts-minister-profile.theme-dark h1,
.acts-minister-profile.theme-dark h2,
.acts-minister-profile.theme-dark h3,
.acts-minister-profile.theme-dark .hero-name,
.acts-minister-profile.theme-dark .hero-meta {
    color: #ffffff;
}

/* 라벨 유지 (form-label, label 등) */
.jmp-theme-root.theme-dark label,
.jmp-theme-root.theme-dark .form-label,
.jmp-theme-root.theme-dark th,
.jmp-mypage-wrapper.theme-dark label,
.jmp-mypage-wrapper.theme-dark .form-label,
.jmp-mypage-wrapper.theme-dark th,
.acts-dashboard-wrap.theme-dark label,
.acts-dashboard-wrap.theme-dark .form-label,
.acts-dashboard-wrap.theme-dark th,
.acts-application-wrap.theme-dark label,
.acts-application-wrap.theme-dark .form-label,
.acts-application-wrap.theme-dark th,
.acts-public-wrap.theme-dark label,
.acts-public-wrap.theme-dark .form-label,
.acts-public-wrap.theme-dark th,
.acts-profile-wrap.theme-dark label,
.acts-profile-wrap.theme-dark .form-label,
.acts-profile-wrap.theme-dark th,
.acts-minister-profile.theme-dark label,
.acts-minister-profile.theme-dark .form-label,
.acts-minister-profile.theme-dark th {
    color: var(--text-2);
}
