/* CCM Demo — tab navigation and save footer only. All other styles from y27-styles.css and ccm-styles.css */

#ccmDemoWrap {
    max-width: 900px;
    margin: 0 auto;
}

/* ── Demo notice bar ─────────────────────────────────────────────────────────── */

.ccm-demo-notice-bar {
    background: #f3eef9;
    border: 1px solid #c4a8e0;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 24px;
    font-size: 0.88em;
    color: #4a3570;
    line-height: 1.5;
}

/* ── Tab navigation wrapper ──────────────────────────────────────────────────── */

.ccm-demo-nav {
    margin-bottom: 32px;
}

/* ── Desktop tabs ────────────────────────────────────────────────────────────── */

.ccm-demo-nav-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
}

#ccmDemoWrap .ccm-demo-nav-tab {
    padding: 10px 18px;
    border: none;
    border-bottom: 3px solid transparent;
    background: none !important;
    background-color: transparent !important;
    font-size: 0.85em;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
    flex-shrink: 0;
    border-radius: 0;
}

#ccmDemoWrap .ccm-demo-nav-tab:hover {
    color: #7D5BA6 !important;
    border-bottom-color: #c4a8e0 !important;
    background: none !important;
    background-color: transparent !important;
}

#ccmDemoWrap .ccm-demo-nav-tab.active {
    color: white !important;
    background: #7D5BA6 !important;
    background-color: #7D5BA6 !important;
    border-bottom-color: #7D5BA6 !important;
    border-radius: 6px 6px 0 0;
}

/* ── Mobile select — hidden on desktop ───────────────────────────────────────── */

.ccm-demo-nav-select {
    display: none;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9em;
    font-family: inherit;
    font-weight: 600;
    color: #2d3748;
    border: 2px solid #7D5BA6;
    border-radius: 8px;
    background: white;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237D5BA6' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    margin-bottom: 16px;
}

/* ── Action buttons — pill style, visually distinct from tabs ────────────────── */

.ccm-demo-nav-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 4px 0;
}

.ccm-demo-action-btn {
    display: inline-block;
    padding: 7px 16px;
    font-size: 0.82em;
    font-weight: 600;
    font-family: inherit;
    border-radius: 20px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.ccm-demo-action-btn-load {
    background: #7D5BA6;
    color: white;
    border-color: #7D5BA6;
}

.ccm-demo-action-btn-load:hover {
    background: #6a4a91;
    border-color: #6a4a91;
    color: white;
}

.ccm-demo-action-btn-clear {
    background: white;
    color: #718096;
    border-color: #cbd5e0;
}

.ccm-demo-action-btn-clear:hover {
    background: #fff5f5;
    color: #c53030;
    border-color: #fc8181;
}

.ccm-demo-action-btn-guide {
    background: white;
    color: #7D5BA6;
    border-color: #c4a8e0;
}

.ccm-demo-action-btn-guide:hover {
    background: #f3eef9;
    color: #6a4a91;
    border-color: #7D5BA6;
}

/* ── Panels ──────────────────────────────────────────────────────────────────── */

.ccm-demo-panel { display: none; }
.ccm-demo-panel.active { display: block; }

/* ── Save footer ─────────────────────────────────────────────────────────────── */

.ccm-demo-save-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

.ccm-demo-save-footer-label {
    font-size: 0.9em;
    color: #4a5568;
    margin-bottom: 14px;
    font-weight: 600;
}

.ccm-demo-save-footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Hint beneath save buttons ───────────────────────────────────────────────── */

.ccm-demo-btn-hint {
    font-size: 0.8em;
    color: #a0aec0;
    margin-top: 8px;
    font-style: italic;
}

/* ── Archetype results editor ────────────────────────────────────────────────── */

.demo-results-editor {
    width: 100%;
    min-height: 160px;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    font-size: 0.95em;
    font-family: inherit;
    color: #2d3748;
    background: white;
    line-height: 1.7;
    outline: none;
    box-sizing: border-box;
}

.demo-results-editor:focus {
    border-color: #7D5BA6;
    box-shadow: 0 0 0 3px rgba(125,91,166,.1);
}

/* ── Rich text toolbar ───────────────────────────────────────────────────────── */

.demo-rte-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.demo-rte-btn {
    padding: 4px 10px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    font-family: inherit;
    color: #2d3748;
    line-height: 1.4;
}

.demo-rte-btn:hover {
    background: #edf2f7;
    border-color: #7D5BA6;
}

/* ── Hide Plan/Dashboard buttons from Tab 3 ──────────────────────────────────── */

#ccmDemoTabBrief .ccm-plan-btn,
#ccmDemoTabBrief .ccm-dashboard-btn {
    display: none !important;
}

/* ── Mobile ──────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .ccm-demo-nav-tabs {
        display: none;
    }

    .ccm-demo-nav-select {
        display: block;
    }

    .ccm-demo-action-btn {
        padding: 8px 14px;
        font-size: 0.82em;
    }
}
