/**
Theme Name: ChronoATX
Theme URI: https://www.chronoatx.com/
Description: ChronoATX Theme for WordPress
Author: ChronoATX
Author URI: https://www.chronoatx.com/
Version: 1.0.0
Text Domain: chronoatx
*/

/* Global Smooth Scroll with Fixed Header Offset */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

/* Custom Animations & Special Effects for ChronoATX Light Gold Theme */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-gold {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.05); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-gold {
    animation: pulse-gold 8s ease-in-out infinite;
}

/* Glassmorphism custom styling with ultra-fine warm borders */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 163, 89, 0.15); /* Soft gold-sand border */
    box-shadow: 0 10px 30px -10px rgba(120, 113, 108, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(212, 163, 89, 0.4);
    box-shadow: 0 20px 40px -15px rgba(212, 163, 89, 0.2);
    transform: translateY(-2px);
}

/* Soft gold glow for interactive buttons */
.btn-gold-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-gold-glow:hover {
    box-shadow: 0 0 20px rgba(212, 163, 89, 0.4);
    transform: translateY(-1px);
}

/* Custom Scrollbar for modern feel */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f4;
}

::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}

/* Global & Responsive Overflow Protection */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Force word wrap on all text containers */
.faq-answer-body,
.prose,
article,
main,
aside {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
    max-width: 100%;
}

/* ==========================================================================
   Code Blocks & ChronoATX (.atx) Script Highlighting (Mobile Responsive)
   ========================================================================== */

/* Inline Code */
:not(pre) > code {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.85em;
    padding: 0.2em 0.45em;
    margin: 0 0.2em;
    background-color: #f5f0e1;
    color: #9e7534;
    border: 1px solid rgba(215, 193, 148, 0.4);
    border-radius: 6px;
    font-weight: 500;
    word-break: break-all;
}

/* Base Pre & ATX Container Block */
.prose pre,
pre.wp-block-code,
.atx-code-container {
    background: #18181b !important;
    border: 1px solid rgba(212, 163, 89, 0.25);
    border-radius: 14px;
    margin: 1.25rem 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.25);
    position: relative;
}

/* Code Header Bar */
.atx-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    background: #27272a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.atx-code-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.atx-code-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.atx-code-dot.dot-red { background: #ef4444; }
.atx-code-dot.dot-yellow { background: #eab308; }
.atx-code-dot.dot-green { background: #22c55e; }

.atx-code-badge {
    font-family: 'Orbitron', 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #e8dbbe;
    background: rgba(212, 163, 89, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(212, 163, 89, 0.3);
    margin-left: 6px;
    white-space: nowrap;
}

.atx-code-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    color: #d4d4d8;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.atx-code-copy-btn:hover {
    background: rgba(212, 163, 89, 0.25);
    color: #ffffff;
    border-color: rgba(212, 163, 89, 0.5);
}

/* Pre / Code Scrollable Area */
.atx-code-container pre,
.prose pre {
    margin: 0 !important;
    padding: 1rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.65;
    color: #e4e4e7;
    white-space: pre;
    tab-size: 4;
}

@media (max-width: 640px) {
    .atx-code-container pre,
    .prose pre {
        font-size: 11px;
        padding: 0.75rem !important;
    }
}

/* ATX Syntax Color Tokens */
.atx-token-keyword { color: #c084fc; font-weight: 600; } /* await, async, var, string, new */
.atx-token-object  { color: #38bdf8; font-weight: 600; } /* Web, Desktop, Mobile, App, Task, Console */
.atx-token-method  { color: #fde047; } /* GotoAsync, InputByLabelAsync, ClickButtonAsync */
.atx-token-string  { color: #86efac; } /* "https://...", "ログイン" */
.atx-token-comment { color: #71717a; font-style: italic; } /* // 注釈, /* */ */
.atx-token-number  { color: #f472b6; } /* 1000, 2000 */
.atx-token-symbol  { color: #94a3b8; } /* ; . ( ) { } = + */
.atx-token-boolean { color: #fb923c; } /* true, false, null */

/* ==========================================================================
   Non-Script Text & Keyword Highlighting
   ========================================================================== */

/* 1. Standard Highlight (mark / .hl / .highlight-gold) */
mark,
.hl,
.highlight-gold {
    background: linear-gradient(120deg, rgba(212, 163, 89, 0.35) 0%, rgba(212, 163, 89, 0.18) 100%);
    color: #805926;
    padding: 0.12em 0.4em;
    border-radius: 4px;
    font-weight: 600;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.hl-green,
.highlight-green {
    background: linear-gradient(120deg, rgba(4, 120, 87, 0.22) 0%, rgba(4, 120, 87, 0.1) 100%);
    color: #065f46;
    padding: 0.12em 0.4em;
    border-radius: 4px;
    font-weight: 600;
}

.hl-blue,
.highlight-blue {
    background: linear-gradient(120deg, rgba(2, 132, 199, 0.22) 0%, rgba(2, 132, 199, 0.1) 100%);
    color: #0369a1;
    padding: 0.12em 0.4em;
    border-radius: 4px;
    font-weight: 600;
}

/* 2. Key / Keyboard Shortcut Style (kbd / .faq-kbd) */
kbd,
.faq-kbd {
    display: inline-flex;
    align-items: center;
    padding: 0.12em 0.5em;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.82em;
    font-weight: 700;
    color: #292524;
    background: #ffffff;
    border: 1px solid #d6d3d1;
    border-bottom: 2px solid #a8a29e;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    margin: 0 0.15em;
}

/* 3. Badge Capsule Pills (.faq-badge) */
.faq-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    background-color: #f5f0e1;
    color: #9e7534;
    border: 1px solid rgba(215, 193, 148, 0.6);
    margin: 0 0.2em;
}

.faq-badge-green {
    background-color: #ecfdf5;
    color: #047857;
    border-color: rgba(167, 243, 208, 0.8);
}

.faq-badge-blue {
    background-color: #f0f9ff;
    color: #0284c7;
    border-color: rgba(186, 230, 253, 0.8);
}

/* 4. Highlight Callout Alert Box */
.faq-callout {
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 12px;
    border-left: 4px solid #b89047;
    background: rgba(245, 240, 225, 0.55);
    font-size: 0.875rem;
    line-height: 1.65;
    color: #292524;
}

.faq-callout-tip {
    border-left-color: #047857;
    background: rgba(244, 248, 246, 0.85);
    color: #065f46;
}

.faq-callout-warn {
    border-left-color: #eab308;
    background: rgba(254, 252, 232, 0.9);
    color: #713f12;
}

/* 5. Live Search Match Highlight */
.search-highlight {
    background-color: #fef08a !important;
    color: #854d0e !important;
    font-weight: 700;
    padding: 0 2px;
    border-radius: 2px;
}