/* Plan Studio — Chat Panel Styles (extracted from plan-studio.css) */

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   8. AI CHAT PANEL (Phase 5B)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Chat collapsed state */
.ps-container.ps-chat-collapsed {
    grid-template-columns: 260px 1fr;
}

.ps-container.ps-chat-collapsed .ps-chat-panel {
    display: none;
}

.ps-chat-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;  /* Fix: grid items default to min-height:auto, blocking child scroll */
    background: var(--bg-secondary, #1a1a2e);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    position: relative;
    transition: border-color 0.3s ease;
}

/* Pulse highlight when âœ¨ generation starts â€” draws eye to chat */
.ps-chat-panel--highlight {
    border-left: 2px solid rgba(139, 92, 246, 0.7);
    animation: ps-chat-pulse 1.5s ease-out;
}

@keyframes ps-chat-pulse {
    0% { box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.3); }
    100% { box-shadow: inset 0 0 0 rgba(139, 92, 246, 0); }
}

/* â”€â”€â”€ Chat Header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.ps-chat-header-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ps-chat-header-actions {
    display: flex;
    gap: 4px;
}

.ps-chat-header-actions button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}

.ps-chat-header-actions button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* â”€â”€â”€ Messages Area â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ps-chat-welcome {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.ps-chat-welcome-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.ps-chat-welcome h4 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.ps-chat-welcome p {
    font-size: 0.78rem;
    margin: 0;
    line-height: 1.5;
}

/* â”€â”€â”€ Chat Bubbles â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-chat-bubble {
    max-width: 92%;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    font-size: 0.82rem;
    line-height: 1.55;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.ps-chat-bubble--user {
    align-self: flex-end;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ps-chat-bubble--assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ps-chat-bubble--system {
    align-self: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
}

.ps-chat-bubble--error {
    align-self: flex-start;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ─── [Phase 7] KaTeX in Plan Studio Chat ────────────────── */
.ps-chat-bubble .katex-display {
    margin: 0.5em 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.ps-chat-bubble .katex {
    font-size: 1em;
    font-family: 'Inter', 'KaTeX_Main', sans-serif;
}

.ps-chat-bubble .katex .mord.text,
.ps-chat-bubble .katex .mord.textrm {
    font-family: 'Inter', system-ui, sans-serif;
}

.ps-chat-bubble .katex-error {
    color: #f97316;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

/* ─── Suggestion Block ─────────────────────────────────────────────────── */

.ps-chat-suggestion {
    margin-top: 0.5rem;
    padding: 0.5rem 0.65rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
}

.ps-chat-suggestion-header {
    font-size: 0.72rem;
    font-weight: 600;
    color: #4ade80;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.ps-chat-suggestion-preview {
    font-size: 0.78rem;
    color: var(--text-secondary, #cbd5e1);
    line-height: 1.5;
    margin-bottom: 0.4rem;
    white-space: pre-line;
    word-break: break-word;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0.6rem;
    border-radius: 4px;
    max-height: 250px;
    overflow-y: auto;
}

.ps-chat-suggestion-actions {
    display: flex;
    gap: 6px;
}

.ps-btn-apply {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ps-btn-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.ps-btn-dismiss {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.ps-btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* â”€â”€â”€ Streaming Indicator â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-chat-streaming {
    display: inline-flex;
    gap: 3px;
    padding: 0.4rem 0.6rem;
    align-self: flex-start;
}

.ps-chat-streaming-dot {
    width: 6px;
    height: 6px;
    background: #6366f1;
    border-radius: 50%;
    animation: psChatBounce 1.2s ease-in-out infinite;
}

.ps-chat-streaming-dot:nth-child(2) { animation-delay: 0.15s; }
.ps-chat-streaming-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes psChatBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* â”€â”€â”€ Input Area â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-chat-input-area {
    display: flex;
    gap: 6px;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.ps-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    resize: none;
    min-height: 36px;
    max-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

.ps-chat-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
}

.ps-chat-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.ps-btn-send {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    padding: 0 0.7rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-btn-send:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.ps-btn-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* [Phase 5C.6] Locked chat state for lesson plans (no section selected) */
.ps-chat-locked {
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
}

.ps-chat-locked-note {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    text-align: center;
    line-height: 1.5;
    opacity: 0.8;
}

.ps-chat-active {
    flex: 1;
    gap: 6px;
    align-items: stretch;
}

/* [Phase 5C.6] Disabled chat state for non-lesson plans */
.ps-chat-disabled {
    justify-content: center;
    padding: 1rem;
}

.ps-chat-disabled-note {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    text-align: center;
    line-height: 1.5;
    opacity: 0.8;
}

/* â”€â”€â”€ Chat Toggle (visible when collapsed) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-chat-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s;
    z-index: 100;
    display: none;
}

.ps-container.ps-chat-collapsed .ps-chat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* â”€â”€â”€ Chat Scrollbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-chat-messages::-webkit-scrollbar {
    width: 5px;
}

.ps-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ps-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.ps-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}



/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CONTEXT CARD (Phase 5B.1 â€” Stage 1 Input Review)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.ps-context-card {
    background: linear-gradient(145deg, rgba(30, 35, 50, 0.95), rgba(20, 25, 40, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 0;
    margin: 8px 4px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.ps-ctx-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    padding: 14px 16px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.ps-ctx-title {
    font-weight: 600;
    font-size: 14px;
    color: #e0e7ff;
    letter-spacing: 0.3px;
}

.ps-ctx-subtitle {
    font-size: 11px;
    color: rgba(165, 180, 252, 0.6);
    margin-top: 4px;
}

/* â”€â”€ Section Rows â”€â”€ */

.ps-ctx-section {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ps-ctx-section:last-of-type {
    border-bottom: none;
}

.ps-ctx-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #c4b5fd;
    margin-bottom: 4px;
}

.ps-ctx-status {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 6px;
}

.ps-ctx-status--ok {
    color: #4ade80;
}

.ps-ctx-status--warn {
    color: #fbbf24;
}

.ps-ctx-detail {
    font-size: 11.5px;
    color: rgba(203, 213, 225, 0.75);
    margin: 2px 0 2px 4px;
    line-height: 1.45;
}

.ps-ctx-note {
    font-size: 10.5px;
    color: rgba(165, 180, 252, 0.5);
    font-style: italic;
    margin: 4px 0 0 4px;
}

/* â”€â”€ Expandable Previews â”€â”€ */

.ps-ctx-expand-btn {
    background: none;
    border: none;
    color: rgba(165, 180, 252, 0.65);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
    margin-top: 4px;
    transition: color 0.15s ease;
}

.ps-ctx-expand-btn:hover {
    color: #a5b4fc;
}

.ps-ctx-expandable {
    margin: 6px 0;
}

.ps-ctx-preview {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 10.5px;
    color: rgba(203, 213, 225, 0.6);
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* â”€â”€ Guidance Input â”€â”€ */

.ps-ctx-guidance {
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.ps-ctx-guidance-label {
    font-size: 12px;
    color: rgba(165, 180, 252, 0.7);
    margin-bottom: 6px;
    display: block;
}

.ps-ctx-guidance-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: #e2e8f0;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ps-ctx-guidance-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.ps-ctx-guidance-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* –– Total Hours Budget Input –– */
.ps-ctx-hours-row {
    display: flex; align-items: center; gap: 8px;
    margin-top: 4px;
}
.ps-ctx-hours-input {
    width: 80px; text-align: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px; padding: 6px 8px;
    font-size: 13px; color: #e2e8f0;
    font-family: inherit; outline: none;
    transition: border-color 0.2s;
}
.ps-ctx-hours-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
}
.ps-ctx-hours-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}
.ps-ctx-hours-label {
    font-size: 12px; color: rgba(203, 213, 225, 0.7);
    font-weight: 500;
}
.ps-ctx-hours-hint {
    font-size: 10.5px; color: rgba(251, 191, 36, 0.6);
    font-style: italic;
}

/* â”€â”€ Generate Button â”€â”€ */

.ps-ctx-generate-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 8px 16px 14px 16px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.ps-ctx-generate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.ps-ctx-generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ps-ctx-generate-btn--disabled,
.ps-ctx-generate-btn:disabled {
    background: rgba(100, 116, 139, 0.3);
    color: rgba(148, 163, 184, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   OBJECTIVES REVIEW CARD (Phase 5B.1 â€” Stage 2 Result)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.ps-objectives-review {
    padding: 10px;
    background: rgba(30, 35, 50, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.ps-objectives-review h4 {
    color: var(--text-primary, #e2e8f0);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.ps-objectives-list,
.ps-cycles-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ps-ctx-objective-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    flex-wrap: wrap;
}

.ps-ctx-obj-id {
    font-weight: 700;
    font-size: 0.7rem;
    flex-shrink: 0;
    min-width: 42px;
}

.ps-ctx-obj-dim {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    text-transform: capitalize;
}

.ps-ctx-obj-desc {
    flex: 1;
    color: var(--text-secondary, #cbd5e1);
    min-width: 120px;
}

.ps-ctx-obj-pages {
    font-size: 0.68rem;
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
}

.ps-ctx-cycle-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.ps-ctx-cycle-num {
    width: 20px;
    height: 20px;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ps-ctx-cycle-title {
    flex: 1;
    color: var(--text-secondary, #cbd5e1);
    min-width: 80px;
}

.ps-ctx-cycle-strategy {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    flex-shrink: 0;
}

.ps-ctx-cycle-pages {
    font-size: 0.68rem;
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
}

.ps-ctx-cycle-keywords {
    font-size: 0.65rem;
    color: var(--text-muted, #64748b);
    font-style: italic;
    width: 100%;
    padding-left: 26px;
}

.ps-ctx-review-actions {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ps-ctx-review-hint {
    font-size: 0.72rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 10px;
    line-height: 1.5;
}

.ps-ctx-btn--lock {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1a1a2e;
    font-weight: 700;
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ps-ctx-btn--lock:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.ps-lock-confirmed-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0.6rem 1rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    text-align: center;
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.82rem;
}

.ps-lock-badge-detail {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted, #64748b);
}

.ps-lock-confirmation {
    padding: 10px;
    background: rgba(30, 35, 50, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.ps-lock-confirmation h4 {
    color: #fbbf24;
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.ps-lock-confirmation p {
    font-size: 0.75rem;
    color: var(--text-secondary, #cbd5e1);
    margin-bottom: 4px;
}

.ps-lock-warnings {
    color: #f59e0b !important;
    font-style: italic;
}



/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PHASE E: SECTION GENERATION UI
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Generate All Bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-generate-all-bar {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06), transparent);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    margin-bottom: 0.5rem;
}

.ps-btn-generate-all {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 0.65rem 1.6rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

.ps-btn-generate-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.ps-btn-generate-all:active {
    transform: translateY(0);
}

/* â”€â”€â”€ Generation Progress Bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-generation-progress {
    width: 100%;
    max-width: 400px;
}

.ps-progress-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 6px;
    text-align: center;
}

.ps-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.ps-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.ps-progress-fill--complete {
    background: linear-gradient(90deg, #22c55e, #16a34a) !important;
}

.ps-progress-fill--error {
    background: linear-gradient(90deg, #ef4444, #dc2626) !important;
}

.ps-progress-detail {
    font-size: 0.72rem;
    color: var(--text-muted, #64748b);
    margin-top: 4px;
    text-align: center;
    min-height: 1em;
}

.ps-generation-complete {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4ade80;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
}

/* â”€â”€â”€ Section Instruction Input â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-section-instruction {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.72rem;
    color: var(--text-primary, #e2e8f0);
    flex: 1;
    min-width: 120px;
    outline: none;
    transition: border-color 0.2s, flex 0.2s;
    font-family: inherit;
}

.ps-section-instruction:focus {
    border-color: rgba(168, 85, 247, 0.5);
    flex: 3;
    background: rgba(0, 0, 0, 0.3);
}

.ps-section-instruction::placeholder {
    color: var(--text-muted, #64748b);
    opacity: 0.5;
    font-size: 0.68rem;
}

.ps-section-instruction:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.1);
}

/* â”€â”€â”€ Disabled Regen Button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-btn-regen--disabled {
    opacity: 0.35;
    cursor: not-allowed !important;
    pointer-events: auto;
}

.ps-btn-regen--disabled:hover {
    transform: none !important;
    background: rgba(168, 85, 247, 0.1) !important;
}

/* â”€â”€â”€ Bundle Buttons (removed â€” Phase 5B.3 cleanup) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* â”€â”€â”€ Section Context Bar (Chat Panel) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-chat-context-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.75rem;
    background: rgba(99, 102, 241, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.ps-chat-context-label {
    font-size: 0.78rem;
    flex-shrink: 0;
}

.ps-chat-context-selector {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: var(--text-primary, #e2e8f0);
    cursor: pointer;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.ps-chat-context-selector:focus {
    border-color: rgba(99, 102, 241, 0.5);
}

.ps-chat-context-selector option {
    background: var(--bg-primary, #0f0f1e);
    color: var(--text-primary, #e2e8f0);
}

/* â”€â”€â”€ System Progress Messages â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.ps-chat-system-msg {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    animation: ps-fade-in 0.3s ease-out;
}

.ps-chat-system-msg .ps-chat-msg-content {
    display: inline-block;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    padding: 0.3rem 0.7rem;
}


