/**
 * LolaCore Admin Styles
 * Premium design for wp-admin settings page and the floating widget.
 */

:root {
    --lc-paper: #FBF8F2;
    --lc-paper-alt: #F4EFE6;
    --lc-plum: #6E2E5C;
    --lc-plum-light: #8A4977;
    --lc-plum-wash: #F2E6EE;
    --lc-mint: #5BB87E;
    --lc-mint-dark: #3F9A62;
    --lc-mint-wash: #E8F5EC;
    --lc-salmon: #E89090;
    --lc-amber: #D4A843;
    --lc-text-primary: #241828;
    --lc-text-secondary: #5A4458;
    --lc-white: #FFFFFF;
    --lc-border: rgba(36, 24, 40, 0.14);
    --lc-radius-card: 14px;
    --lc-radius-btn: 10px;
    --lc-radius-pill: 999px;
    --lc-shadow-card: 0 1px 2px rgba(36,24,40,0.04), 0 8px 24px rgba(36,24,40,0.06);
    --lc-font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --lc-font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;
}

/* ===== Layout Container ===== */
.lolacore-admin-wrap {
    max-width: 960px;
    margin: 20px auto 0;
}

.lolacore-admin-wrap > h1 {
    display: none; /* Hidden because we have the premium header inside */
}

.lolacore-tab-content {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* Base Settings Container */
.lc-settings-container {
    background: var(--lc-paper);
    font-family: var(--lc-font-primary);
    color: var(--lc-text-primary);
    padding: 32px 36px;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(36, 24, 40, 0.08), 0 12px 32px rgba(36, 24, 40, 0.04);
    margin-top: 12px;
}

/* Header */
.lc-settings-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--lc-border);
}

.lc-settings-header .lc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(36,24,40,0.1);
}

.lc-settings-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lc-eyebrow {
    font-family: var(--lc-font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--lc-plum);
}

.lc-settings-header h2 {
    margin: 0;
    font-family: var(--lc-font-primary);
    font-size: 1.5em;
    font-weight: 800;
    color: var(--lc-text-primary);
    letter-spacing: -0.01em;
}

.lc-header-subtitle {
    font-size: 0.85em;
    color: var(--lc-text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

.lc-header-status {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

/* Components */
.lc-card {
    background: var(--lc-white);
    border: 1px solid rgba(36,24,40,0.10);
    border-radius: var(--lc-radius-card);
    padding: 24px 28px;
    box-shadow: var(--lc-shadow-card);
    margin-bottom: 24px;
}

.lc-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.lc-section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--lc-plum-wash);
    color: var(--lc-plum);
    border-radius: 50%;
    font-family: var(--lc-font-mono);
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.lc-card h3 {
    margin: 0;
    font-family: var(--lc-font-primary);
    font-size: 1.15em;
    font-weight: 800;
    color: var(--lc-text-primary);
    letter-spacing: -0.01em;
}

.lc-card > .description {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--lc-text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
}

/* Pills */
.lc-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--lc-radius-pill);
    font-family: var(--lc-font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.lc-pill.mint { background: var(--lc-mint-wash); color: var(--lc-mint-dark); }
.lc-pill.plum { background: var(--lc-plum-wash); color: var(--lc-plum); }
.lc-pill.amber { background: #FDF5E2; color: #9A7723; }
.lc-pill.gray { background: #F0F0F1; color: var(--lc-text-secondary); }

/* Addon catalog cards (Expansions panel + Addons page) */
.lc-expansions-panel {
    margin-top: 0;
}

.lc-addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.lc-addon-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-btn);
    background: var(--lc-paper);
}

.lc-addon-card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lc-addon-card-title {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    color: var(--lc-text-primary);
}

.lc-addon-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lc-addon-card-count {
    margin: 0;
    font-family: var(--lc-font-mono);
    font-size: 12px;
    color: var(--lc-text-secondary);
}

.lc-addon-card-tagline {
    margin: 0;
    flex: 1;
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--lc-text-secondary);
}

.lc-addon-card-actions {
    margin-top: 4px;
}

.lc-addon-card-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--lc-plum);
    text-decoration: none;
}

.lc-addon-card-link:hover {
    text-decoration: underline;
}

.lc-addons-page .lc-settings-header {
    margin-bottom: 24px;
}

.lc-addons-grid-card > .description {
    margin-bottom: 0;
}

/* Radio Cards (Communication Style) */
.lc-radio-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lc-radio-card {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-btn);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--lc-white);
}

.lc-radio-card:hover {
    border-color: var(--lc-mint);
    background: var(--lc-mint-wash);
}

.lc-radio-card input[type="radio"] {
    accent-color: var(--lc-mint);
    margin-top: 4px;
    margin-right: 12px;
}

.lc-radio-content strong {
    display: block;
    font-weight: 700;
    color: var(--lc-text-primary);
    margin-bottom: 2px;
}

.lc-radio-content span {
    font-size: 0.9em;
    color: var(--lc-text-secondary);
}

/* Buttons */
.lc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    border-radius: var(--lc-radius-btn);
    font-weight: 600;
    font-size: 0.95em;
    font-family: var(--lc-font-primary);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.lc-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lc-action-btn.primary {
    background: var(--lc-mint);
    color: var(--lc-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.lc-action-btn.primary:hover:not(:disabled) {
    background: var(--lc-mint-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91,184,126,0.25);
}

.lc-action-btn.ghost {
    background: var(--lc-white);
    color: var(--lc-text-primary);
    border: 1px solid var(--lc-border);
}
.lc-action-btn.ghost:hover:not(:disabled) {
    background: var(--lc-paper);
    border-color: rgba(36,24,40,0.25);
}

.lc-action-btn.danger {
    background: var(--lc-salmon);
    color: var(--lc-white);
}
.lc-action-btn.danger:hover:not(:disabled) {
    background: #D97E7E;
}

/* Custom Select & Inputs */
.lc-select, .lc-input {
    width: 100%;
    max-width: 320px;
    border-radius: var(--lc-radius-btn);
    border: 1px solid var(--lc-border);
    padding: 10px 14px;
    font-family: var(--lc-font-primary);
    font-size: 0.95em;
    color: var(--lc-text-primary);
    transition: all 0.2s;
    background: var(--lc-white);
    box-sizing: border-box;
}

.lc-select:focus, .lc-input:focus {
    border-color: var(--lc-mint);
    box-shadow: 0 0 0 2px var(--lc-mint-wash);
    outline: none;
}

.lc-form-table {
    width: 100%;
    border-collapse: collapse;
}

.lc-form-table th {
    text-align: left;
    padding: 16px 0;
    font-weight: 600;
    color: var(--lc-text-primary);
    width: 200px;
    border-bottom: 1px solid var(--lc-border);
}

.lc-form-table td {
    padding: 16px 0;
    border-bottom: 1px solid var(--lc-border);
}

.lc-form-table tr:last-child th,
.lc-form-table tr:last-child td {
    border-bottom: none;
    padding-bottom: 0;
}

/* Toggle Switch */
.lc-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-btn);
    margin-bottom: 12px;
}

.lc-toggle-label strong {
    display: block;
    font-weight: 700;
    color: var(--lc-text-primary);
}
.lc-toggle-label span {
    font-size: 0.9em;
    color: var(--lc-text-secondary);
}

.lc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.lc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #D1D5DB;
    transition: .3s;
    border-radius: 24px;
}

.lc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--lc-white);
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lc-toggle input:checked + .lc-toggle-slider {
    background-color: var(--lc-mint);
}

.lc-toggle input:checked + .lc-toggle-slider:before {
    transform: translateX(20px);
}

.lc-toggle input:disabled + .lc-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Avatar Group */
.lc-avatar-group {
    display: flex;
    align-items: center;
    gap: 24px;
}
.lc-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(36,24,40,0.1);
    border: 4px solid var(--lc-white);
}

/* Status Bar */
.lc-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--lc-radius-btn);
    margin-top: 16px;
    transition: background 0.3s, color 0.3s;
}

/* Status Bar — Color Variants */
.lc-status-bar--green {
    background: var(--lc-mint-wash);
}
.lc-status-bar--green .lc-status-text {
    color: var(--lc-mint-dark);
}
.lc-status-bar--amber {
    background: #FDF5E2;
}
.lc-status-bar--amber .lc-status-text {
    color: #9A7723;
}
.lc-status-bar--red {
    background: #FDF0F0;
}
.lc-status-bar--red .lc-status-text {
    color: #B74545;
}

/* Status Dot Indicator */
.lc-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: lc-dot-pulse 2.5s ease-in-out infinite;
}
.lc-status-dot--green {
    background: var(--lc-mint);
    box-shadow: 0 0 0 0 rgba(91,184,126,0.4);
}
.lc-status-dot--amber {
    background: var(--lc-amber);
    box-shadow: 0 0 0 0 rgba(212,168,67,0.4);
}
.lc-status-dot--red {
    background: var(--lc-salmon);
    box-shadow: 0 0 0 0 rgba(232,144,144,0.4);
    animation: lc-dot-pulse-red 1.8s ease-in-out infinite;
}

@keyframes lc-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(91,184,126,0.35); }
    50% { box-shadow: 0 0 0 5px rgba(91,184,126,0); }
}
@keyframes lc-dot-pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232,144,144,0.4); }
    50% { box-shadow: 0 0 0 5px rgba(232,144,144,0); }
}

.lc-status-text {
    font-size: 0.9em;
    font-weight: 500;
}

/* Sticky Footer */
.lc-sticky-footer {
    position: sticky;
    bottom: 0;
    background: var(--lc-paper);
    padding: 16px 0;
    margin-top: 32px;
    border-top: 1px solid var(--lc-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
    z-index: 10;
    animation: lc-footer-slide-up 0.25s ease-out;
}

@keyframes lc-footer-slide-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lc-dirty-label {
    margin-right: auto;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--lc-amber);
}

/* Grid Layouts for Sections 5-7 placeholders */
.lc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Spinner */
#save-spinner {
    float: none;
    margin-left: 10px;
    margin-top: 0;
}

/* Hide WP notices if they break layout */
.lolacore-admin-wrap > .notice {
    margin-bottom: 20px;
}

/* ===== Responsive: Settings Page ===== */
@media (max-width: 1024px) {
    .lc-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .lc-settings-container {
        padding: 20px 16px;
    }

    .lc-settings-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .lc-header-status {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
        margin-left: 0;
    }

    .lc-header-subtitle {
        display: none;
    }

    .lc-card {
        padding: 20px 18px;
    }

    .lc-form-table th {
        display: block;
        width: 100%;
        padding-bottom: 4px;
        border-bottom: none;
    }
    .lc-form-table td {
        display: block;
        width: 100%;
        padding-top: 0;
    }

    .lc-sticky-footer {
        flex-wrap: wrap;
        gap: 8px;
    }
    .lc-dirty-label {
        width: 100%;
        text-align: center;
    }
    .lc-sticky-footer .lc-action-btn {
        flex: 1;
        text-align: center;
    }

    .lc-grid-2 {
        grid-template-columns: 1fr;
    }

    .lc-avatar-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* --- Floating Widget Styles --- */

.lolacore-hidden {
    display: none !important;
}

#lolacore-widget-trigger {
    position: fixed;
    bottom: 30px;
    left: 50%;
    margin-left: -30px; /* Center horizontally (width is 60px) */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.25s;
    user-select: none;
    -webkit-user-drag: none;
    animation: lolacore-pulse 3s ease-in-out infinite;
}

@keyframes lolacore-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
    50% { box-shadow: 0 4px 16px rgba(0,0,0,0.18), 0 0 0 8px rgba(91,184,126,0.12); }
}

#lolacore-widget-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(91,184,126,0.25);
    animation: none;
}

#lolacore-widget-trigger img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

#lolacore-widget-panel {
    position: fixed;
    bottom: 100px;
    left: 50%;
    margin-left: -275px; /* Center horizontally (width is 550px) */
    width: 550px;
    height: 700px;
    max-height: calc(100vh - 120px);
    max-width: calc(100vw - 40px);
    min-width: 400px;
    min-height: 450px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dcdcde;
    resize: both;
}

/* Visual resize grip indicator (bottom-right corner) */
#lolacore-widget-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    background:
        linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.08) 50%) no-repeat bottom right / 8px 8px,
        linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.08) 50%) no-repeat bottom right / 13px 13px;
    border-radius: 0 0 12px 0;
    pointer-events: none;
    z-index: 1;
}

.lolacore-chat-header {
    background: var(--lc-plum);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
}

.lolacore-chat-header:active {
    cursor: grabbing;
}

.lolacore-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lolacore-header-left img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.lolacore-header-status {
    font-family: var(--lc-font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--lc-mint);
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.05em;
}

.lolacore-header-title {
    font-weight: 600;
    font-size: 1.1em;
}

.lolacore-header-right {
    display: flex;
    gap: 5px;
}

.lolacore-icon-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
    opacity: 0.8;
}

.lolacore-icon-btn:hover {
    opacity: 1;
}

#lolacore-onboarding-status {
    background: var(--lc-mint-wash);
    padding: 10px 16px;
    font-size: 0.9em;
    color: var(--lc-mint-dark);
    border-bottom: 1px solid var(--lc-border);
}

.lolacore-progress-bar {
    height: 4px;
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.lolacore-progress-fill {
    height: 100%;
    background: var(--lc-mint);
    width: 100%;
    animation: indeterminate 1.5s infinite linear;
    transform-origin: 0% 50%;
}

@keyframes indeterminate {
    0% { transform:  translateX(0) scaleX(0); }
    40% { transform:  translateX(0) scaleX(0.4); }
    100% { transform:  translateX(100%) scaleX(0.5); }
}

.lolacore-chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: var(--lc-paper);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lolacore-message {
    display: flex;
    gap: 12px;
    max-width: 90%;
}

.lolacore-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.lolacore-msg-assistant {
    align-self: flex-start;
}

.lolacore-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lolacore-msg-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lolacore-msg-text {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.lolacore-msg-user .lolacore-msg-text {
    background: var(--lc-plum);
    color: #fff;
    border-top-right-radius: 4px;
}

.lolacore-msg-assistant .lolacore-msg-text {
    background: #fff;
    color: var(--lc-text-primary);
    border: 1px solid var(--lc-border);
    border-top-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(36,24,40,0.04);
}

/* Error message visual treatment — replaces emoji ⚠️ prefix */
.lola-error-message .lolacore-msg-text {
    border-left: 3px solid var(--lc-salmon);
    background: #FDF0F0;
    color: var(--lc-text-secondary);
}

.lolacore-memory-indicator {
    font-size: 0.75em;
    color: #646970;
    margin-left: 5px;
}

/* Tool Confirmation Card */
.lolacore-tool-confirmation {
    margin-top: 8px;
    border: 1px solid var(--lc-amber);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.lolacore-tc-header {
    background: #FDF5E2;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--lc-amber);
    font-size: 13px;
    color: #9A7723;
}

.lolacore-tc-icon {
    font-size: 16px;
}

.lolacore-tc-body {
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #1d2327;
}

.lolacore-tc-body p {
    margin: 0 0 4px;
}

.lolacore-tc-params {
    color: #646970;
    font-family: monospace;
    font-size: 12px;
}

.lolacore-tc-preview {
    color: #646970;
    font-style: italic;
}

.lolacore-tool-confirmation-failed {
    border-color: #d63638;
}

.lolacore-tc-preview-failed {
    color: #8a2424;
    font-style: normal;
}

.lolacore-tc-approve:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.lolacore-tc-actions {
    padding: 10px 14px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-top: 1px solid #f0f0f1;
    flex-wrap: wrap;
}

.lolacore-tc-btn {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.lolacore-tc-approve {
    background: var(--lc-mint);
    color: #fff;
    border-color: var(--lc-mint);
}

.lolacore-tc-approve:hover:not(:disabled) {
    background: var(--lc-mint-dark);
}

.lolacore-tc-cancel {
    background: #fff;
    color: var(--lc-salmon);
    border-color: var(--lc-salmon);
}

.lolacore-tc-cancel:hover:not(:disabled) {
    background: #FDF0F0;
}

.lolacore-tc-status {
    font-size: 12px;
    margin: 4px 0 0;
    font-weight: 600;
}

/* Plugin Builder delivery confirmation (pre-save) */
.lolacore-tc-pb-delivery {
    border-color: var(--lc-mint);
}

.lolacore-tc-pb-delivery .lolacore-tc-header {
    background: var(--lc-mint-wash);
    border-bottom-color: var(--lc-mint);
    color: var(--lc-mint-dark);
}

.lolacore-tc-pb-delivery .lolacore-tc-icon-positive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--lc-mint);
    font-size: 0;
    flex-shrink: 0;
}

.lolacore-tc-pb-delivery .lolacore-tc-icon-positive::before {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.lolacore-tc-pb-name {
    margin: 0 0 4px;
    font-size: 14px;
}

.lolacore-tc-pb-meta {
    margin: 0 0 6px;
    color: var(--lc-text-secondary);
    font-size: 12px;
    font-family: monospace;
}

.lolacore-tc-pb-edu {
    margin: 0 0 8px;
    color: var(--lc-text-primary);
    font-size: 13px;
    line-height: 1.5;
}

.lolacore-tc-pb-guide {
    margin: 0 0 10px;
    color: var(--lc-text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.lolacore-tc-pb-edu-details {
    margin: 4px 0 10px;
    font-size: 12px;
    color: var(--lc-text-secondary);
}

.lolacore-tc-pb-edu-details > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--lc-text-primary);
    padding: 4px 0;
}

.lolacore-tc-pb-edu-details p {
    margin: 6px 0 0;
    line-height: 1.45;
}

.lolacore-tc-pb-suggestions {
    margin-top: 4px;
    font-size: 12px;
    color: var(--lc-text-secondary);
}

.lolacore-tc-pb-suggestions > summary,
.lolacore-tc-pb-technical > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--lc-text-primary);
    padding: 4px 0;
}

.lolacore-tc-pb-suggestion-list {
    margin: 6px 0 8px 18px;
    padding: 0;
    line-height: 1.45;
}

.lolacore-tc-pb-suggestion-list li {
    margin-bottom: 4px;
}

.lolacore-tc-pb-technical {
    margin-top: 6px;
    font-size: 12px;
}

.lolacore-tc-pb-technical p {
    margin: 6px 0 0;
    color: #646970;
    line-height: 1.45;
}

/* Plugin rollback confirmation */
.lolacore-tc-rollback .lolacore-tc-rollback-name {
    margin: 0 0 6px;
    font-size: 14px;
}

.lolacore-tc-rollback-version {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.lolacore-tc-rollback-from {
    color: #646970;
}

.lolacore-tc-rollback-arrow {
    color: #9A7723;
    font-weight: 400;
}

.lolacore-tc-rollback-to {
    color: #1d2327;
}

.lolacore-tc-rollback-reassure {
    margin: 0 0 6px;
    color: #50575e;
}

.lolacore-tc-rollback-active {
    margin: 0;
    color: #646970;
    font-size: 12px;
}

/* Builder Progress Card */
.lolacore-builder-progress {
    margin-top: 8px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 12px 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.lolacore-bp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--lc-text-primary);
    margin-bottom: 4px;
}

.lolacore-bp-spinner {
    font-size: 14px;
}

.lolacore-bp-status {
    font-size: 12px;
    color: var(--lc-text-secondary);
    line-height: 1.4;
}

/* Terminal states — swap the card accent so it no longer reads as "in progress". */
.lolacore-builder-progress.is-done {
    border-color: var(--lc-mint);
    background: var(--lc-mint-wash);
}

.lolacore-builder-progress.is-done .lolacore-bp-bar-fill {
    background: var(--lc-mint);
}

.lolacore-builder-progress.is-failed {
    border-color: var(--lc-amber);
    background: var(--lc-plum-wash);
}

.lolacore-builder-progress.is-failed .lolacore-bp-title {
    color: var(--lc-text-primary);
}

.lolacore-builder-progress.is-failed .lolacore-bp-status {
    color: var(--lc-text-secondary);
}

.lolacore-builder-progress.is-failed .lolacore-bp-bar-fill {
    background: var(--lc-amber);
}

.lolacore-builder-progress.is-timeout {
    border-color: var(--lc-amber);
    background: var(--lc-paper-alt);
}

.lolacore-builder-progress.is-timeout .lolacore-bp-bar-fill {
    background: var(--lc-amber);
}

.lolacore-bp-retry {
    cursor: pointer;
    border: 1px solid var(--lc-border);
    background: var(--lc-white);
    color: var(--lc-plum);
    border-radius: var(--lc-radius-btn);
    padding: 6px 14px;
    font-weight: 600;
    font-family: var(--lc-font-primary);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.lolacore-bp-retry:hover:not(:disabled) {
    border-color: var(--lc-mint);
    background: var(--lc-mint-wash);
    color: var(--lc-mint-dark);
}

.lolacore-bp-retry:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Plugin Builder artifact cards (chat) */
.lolacore-artifact-card {
    margin-top: 8px;
    border: 1px solid var(--lc-mint);
    border-radius: var(--lc-radius-card);
    overflow: hidden;
    background: var(--lc-white);
    box-shadow: var(--lc-shadow-card);
}

.lolacore-artifact-header {
    background: var(--lc-mint-wash);
    padding: 10px 14px;
    border-bottom: 1px solid rgba(91, 184, 126, 0.35);
    font-size: 14px;
    color: var(--lc-text-primary);
}

.lolacore-artifact-meta {
    padding: 8px 14px 0;
    font-family: var(--lc-font-mono);
    font-size: 12px;
    color: var(--lc-text-secondary);
}

.lolacore-artifact-actions {
    padding: 12px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.lolacore-artifact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: var(--lc-radius-btn);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.lolacore-artifact-btn-primary {
    background: var(--lc-mint);
    color: var(--lc-white);
    border-color: var(--lc-mint);
}

.lolacore-artifact-btn-primary:hover {
    background: var(--lc-mint-dark);
    color: var(--lc-white);
}

.lolacore-artifact-btn-secondary {
    background: var(--lc-white);
    color: var(--lc-plum);
    border-color: var(--lc-border);
}

.lolacore-artifact-btn-secondary:hover {
    background: var(--lc-plum-wash);
}

.lolacore-artifact-hint {
    padding: 0 14px 12px;
    margin: 0;
    font-size: 12px;
    color: var(--lc-text-secondary);
}

.lolacore-pg-gate-root {
    padding: 0 14px 14px;
}

.lolacore-bp-playground-progress {
    padding: 0 14px 14px;
}

.lolacore-pg-gate-hint {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--lc-text-secondary);
}

.lolacore-pg-gate-hint--failed {
    color: #b32d2e;
}

.lolacore-pg-attest-copy {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--lc-text-primary);
}

.lolacore-pg-attest-panel {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(91, 184, 126, 0.25);
}

.lolacore-pg-pending-install-row {
    margin-top: 8px;
}

.lolacore-pg-open-row--demoted {
    opacity: 0.85;
}

.lolacore-pg-open-row--demoted .lolacore-artifact-btn-primary {
    background: var(--lc-white);
    color: var(--lc-plum);
    border-color: var(--lc-border);
    font-size: 12px;
    padding: 5px 10px;
}

.lolacore-pg-open-row--demoted .lolacore-artifact-btn-primary:hover {
    background: var(--lc-plum-wash);
    color: var(--lc-plum);
}

.lolacore-pg-open-row--demoted .lolacore-bp-copy-url {
    display: none;
}

.lolacore-pg-installed-panel {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(91, 184, 126, 0.25);
}

.lolacore-pg-install-status--success {
    color: var(--lc-mint-dark);
    font-weight: 600;
}

.lolacore-pg-activate-prompt {
    margin: 8px 0 6px;
    font-size: 13px;
    color: var(--lc-text-primary);
}

.lolacore-pg-activate-actions {
    padding: 0;
}

.lolacore-pg-install-error {
    margin: 8px 0 0;
    font-size: 13px;
    color: #b32d2e;
}

.lolacore-pg-activate-error {
    margin: 8px 0 0;
    font-size: 13px;
    color: #b32d2e;
}

.lolacore-pg-error {
    margin: 0 0 8px;
    font-size: 13px;
    color: #b32d2e;
}

.lolacore-pg-install-status {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--lc-text-primary);
}

.lolacore-pg-install-status a {
    color: var(--lc-mint-dark);
}

.lolacore-chat-footer {
    padding: 12px;
    background: #fff;
    border-top: 1px solid var(--lc-border);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#lolacore-input {
    flex: 1;
    border: 1px solid #dcdcde;
    border-radius: 20px;
    padding: 10px 14px;
    resize: none;
    max-height: 120px;
    font-family: inherit;
    line-height: 1.4;
    overflow-y: auto;
}

#lolacore-input:focus {
    border-color: var(--lc-mint);
    box-shadow: 0 0 0 1px var(--lc-mint);
    outline: none;
}

#lolacore-send {
    background: var(--lc-mint);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

#lolacore-send:hover {
    background: var(--lc-mint-dark);
}

#lolacore-status {
    padding: 6px 16px;
    background: var(--lc-paper);
    font-size: 0.8em;
    color: var(--lc-text-secondary);
    border-top: 1px solid var(--lc-border);
}

@media (max-width: 782px) {
    #lolacore-widget-panel {
        bottom: 10px;
        left: 10px;
        margin-left: 0;
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        max-height: none;
        min-width: 0;
        min-height: 0;
        border-radius: 8px;
        resize: none;
    }

    #lolacore-widget-panel::after {
        display: none;
    }
}

/* ===== Markdown Rendering Styles (Chat) ===== */
.lolacore-msg-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 0.9em;
}

.lolacore-msg-text th,
.lolacore-msg-text td {
    border: 1px solid #dcdcde;
    padding: 6px 10px;
    text-align: left;
}

.lolacore-msg-text th {
    background: #f0f6fc;
    font-weight: 600;
}

.lolacore-msg-text pre {
    background: #1d2327;
    color: #f0f6fc;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.9em;
    margin: 8px 0;
}

.lolacore-msg-text code {
    background: rgba(0,0,0,0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.lolacore-msg-text pre code {
    background: transparent;
    padding: 0;
}

.lolacore-msg-user .lolacore-msg-text code {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ===== Custom Modal ===== */
.lc-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(36,24,40,0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.lc-modal-card {
    background: var(--lc-white);
    border-radius: var(--lc-radius-card);
    width: 520px;
    max-width: 90vw;
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    overflow: hidden;
    font-family: var(--lc-font-primary);
}
.lc-modal-header {
    background: #FDF0F0;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(232,144,144,0.3);
}
.lc-modal-header h3 {
    margin: 0;
    color: var(--lc-salmon);
    font-weight: 800;
}
.lc-modal-header--neutral {
    background: var(--lc-paper);
    border-bottom: 1px solid var(--lc-border);
}
.lc-modal-header--neutral h3 {
    color: var(--lc-text-primary);
    font-weight: 700;
}
.lc-modal-body {
    padding: 24px;
    color: var(--lc-text-primary);
    line-height: 1.6;
    font-size: 14px;
}
.lc-modal-body p {
    margin: 0;
}
.lc-modal-body ul {
    padding-left: 0;
}
.lc-modal-body ul li {
    margin-bottom: 4px;
}
.lc-modal-footer {
    padding: 16px 24px;
    background: var(--lc-paper);
    border-top: 1px solid var(--lc-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* =============================================
   Section 8: Skills (SMD-04)
   ============================================= */

.lc-skills-section {
    margin-top: 16px;
}

.lc-playbook-distill-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.88);
}

.lc-playbook-distill-overlay-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: var(--lc-paper, #fff);
    border: 1px solid var(--lc-border, #dcdcde);
    border-radius: var(--lc-radius-btn, 8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    color: var(--lc-ink, #1d2327);
}

#lolacore-playbook-distill-review {
    margin-bottom: 20px;
}

.lc-skills-counter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    background: var(--lc-paper);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-btn);
    margin-bottom: 20px;
}

.lc-skills-counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.lc-skills-counter-text {
    font-size: 0.95em;
    color: var(--lc-text-secondary);
}
.lc-skills-counter-text strong {
    color: var(--lc-text-primary);
    font-weight: 700;
}

.lc-skills-group {
    margin-bottom: 12px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-btn);
    background: var(--lc-white);
    overflow: hidden;
}

/* When rendered as a <details>, the native marker is replaced by our chevron. */
.lc-skills-group > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.lc-skills-group > summary::-webkit-details-marker {
    display: none;
}

.lc-skills-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--lc-font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lc-text-secondary);
    margin: 0;
    padding: 12px 16px;
    transition: background 0.15s;
}

.lc-skills-group[open] > .lc-skills-group-title {
    border-bottom: 1px solid var(--lc-border);
    background: var(--lc-paper);
}

.lc-skills-group > summary.lc-skills-group-title:hover {
    background: var(--lc-paper);
}

.lc-skills-group-chevron {
    display: inline-block;
    font-size: 10px;
    line-height: 1;
    color: var(--lc-text-secondary);
    transition: transform 0.18s ease;
    width: 10px;
    text-align: center;
}

.lc-skills-group[open] > summary > .lc-skills-group-chevron {
    transform: rotate(90deg);
}

.lc-skills-group-label {
    flex-shrink: 0;
}

.lc-skills-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 1px 8px;
    background: var(--lc-plum-wash);
    color: var(--lc-plum);
    border-radius: var(--lc-radius-pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
}

.lc-skills-group-body {
    padding: 12px 14px;
    background: var(--lc-white);
}

.lc-skills-group-body .lc-skill-row:last-child {
    margin-bottom: 0;
}

/* Error-section title stays as <h4>, not a summary. */
.lc-skills-group-title--error {
    display: block;
    color: var(--lc-salmon);
    padding: 0 0 8px 0;
    background: transparent;
    border-bottom: 1px solid rgba(232, 144, 144, 0.3);
}

/* Skill Row */
.lc-skill-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-btn);
    margin-bottom: 8px;
    background: var(--lc-white);
    transition: opacity 0.3s, border-color 0.2s;
}

.lc-skill-row:hover {
    border-color: rgba(36, 24, 40, 0.2);
}

.lc-skill-row.lc-skill-row--removing {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.35s, transform 0.35s;
}

.lc-skill-toggle-col {
    flex-shrink: 0;
    padding-top: 2px;
}

/* Smaller toggle for skill rows */
.lc-toggle--sm {
    width: 36px;
    height: 20px;
}
.lc-toggle--sm .lc-toggle-slider {
    border-radius: 20px;
}
.lc-toggle--sm .lc-toggle-slider:before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
}
.lc-toggle--sm input:checked + .lc-toggle-slider:before {
    transform: translateX(16px);
}

.lc-skill-info {
    flex: 1;
    min-width: 0;
}

.lc-skill-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.lc-skill-name {
    font-family: var(--lc-font-mono);
    font-weight: 600;
    font-size: 0.95em;
    color: var(--lc-text-primary);
}

.lc-skill-priority {
    font-family: var(--lc-font-mono);
    font-size: 11px;
    color: var(--lc-text-secondary);
    background: var(--lc-paper);
    padding: 1px 8px;
    border-radius: var(--lc-radius-pill);
    border: 1px solid var(--lc-border);
}

.lc-skill-desc {
    margin: 0 0 6px 0;
    font-size: 0.88em;
    line-height: 1.45;
    color: var(--lc-text-secondary);
}

/* Badges */
.lc-skill-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--lc-radius-pill);
    font-family: var(--lc-font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lc-skill-badge--active {
    background: var(--lc-mint-wash);
    color: var(--lc-mint-dark);
}

.lc-skill-badge--inactive {
    background: #F0F0F1;
    color: var(--lc-text-secondary);
}

.lc-skill-badge--warn {
    background: #FDF5E2;
    color: #9A7723;
}

.lc-skill-badge--error {
    background: #FDF0F0;
    color: #B74545;
}

.lc-skill-badge--draft {
    background: #EDF2FF;
    color: #3858A8;
}

.lc-skill-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 2px;
}

.lc-skill-actions .lc-action-btn {
    padding: 4px 12px;
    font-size: 0.85em;
}

/* Broken skills */
.lc-skills-broken {
    margin-top: 16px;
}

.lc-skill-error-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #FDF0F0;
    border: 1px solid rgba(232, 144, 144, 0.3);
    border-radius: var(--lc-radius-btn);
    margin-bottom: 6px;
}

.lc-skill-error-msg {
    font-size: 0.88em;
    color: #B74545;
    font-family: var(--lc-font-mono);
}

/* Skills responsive */
@media (max-width: 782px) {
    .lc-skill-row {
        flex-wrap: wrap;
    }
    .lc-skill-actions {
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid var(--lc-border);
        margin-top: 4px;
    }
    .lc-skills-counter {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* ====================================================================
   Skills — SMD-05 additions
   ==================================================================== */

/* Counter actions bar */
.lc-skills-counter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Pending drafts banner */
.lolacore-skills-drafts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: #FFF8E7;
    border: 1px solid #F5D680;
    border-radius: var(--lc-radius-btn);
    margin-bottom: 16px;
    font-size: 0.92em;
    color: #7A5C00;
}

/* Draft row highlight */
.lc-skill-row--draft {
    border-left: 3px solid #F5D680;
    background: #FFFDF5;
}

/* Draft badge */
.lc-skill-badge--draft {
    background: #FFF1CC;
    color: #8B6914;
    font-weight: 600;
}

/* Skill actions row (for edit/activate/delete) */
.lc-skill-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

/* Read-only source viewer (replaces the old inline editor) */
.lc-skill-viewer {
    flex-basis: 100%;
    padding: 12px 0 0 0;
    border-top: 1px solid var(--lc-border);
    margin-top: 8px;
}

.lc-skill-viewer-hint {
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: var(--lc-text-secondary);
    line-height: 1.5;
}

.lc-skill-viewer-hint em {
    font-style: italic;
    color: var(--lc-text-primary);
}

.lc-skill-viewer-source {
    margin: 0;
    width: 100%;
    max-height: 360px;
    overflow: auto;
    padding: 12px 14px;
    font-family: var(--lc-font-mono);
    font-size: 0.85em;
    line-height: 1.55;
    background: #FAFAFA;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-btn);
    color: var(--lc-text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Import modal */
.lc-skill-import-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 640px;
    width: 90vw;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.lc-skill-import-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.lc-skill-import-modal-inner {
    padding: 28px 32px;
}

.lc-skill-import-modal-inner h3 {
    margin: 0 0 16px 0;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--lc-text-primary);
}

.lc-skill-import-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--lc-border);
    padding-bottom: 0;
}

.lc-skill-import-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    font-size: 0.92em;
    font-weight: 600;
    color: var(--lc-text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.lc-skill-import-tab:hover {
    color: var(--lc-mint-dark);
}

.lc-skill-import-tab.active {
    color: var(--lc-mint-dark);
    border-bottom-color: var(--lc-mint);
}

.lc-skill-import-panel textarea {
    width: 100%;
    font-family: var(--lc-font-mono);
    font-size: 0.88em;
    padding: 10px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-btn);
    resize: vertical;
    background: #FAFAFA;
    color: var(--lc-text-primary);
    line-height: 1.5;
}

.lc-file-upload-label {
    display: inline-block;
    padding: 8px 16px;
    border: 1px dashed var(--lc-border);
    border-radius: var(--lc-radius-btn);
    cursor: pointer;
    font-size: 0.92em;
    color: var(--lc-text-secondary);
    transition: border-color 0.15s, color 0.15s;
}

.lc-file-upload-label:hover {
    border-color: var(--lc-mint);
    color: var(--lc-mint-dark);
}

.lc-skill-import-panel input[type="file"] {
    display: none;
}

.lc-file-name {
    margin-left: 10px;
    font-size: 0.88em;
    color: var(--lc-text-secondary);
}

.lc-skill-import-error {
    margin-top: 12px;
    padding: 8px 12px;
    background: #FDF0F0;
    border: 1px solid rgba(232, 144, 144, 0.3);
    border-radius: var(--lc-radius-btn);
    color: #B74545;
    font-size: 0.88em;
    font-family: var(--lc-font-mono);
}

.lc-skill-import-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

.lc-btn-spinner {
    display: inline-block;
    animation: lc-spin 1s linear infinite;
}

@keyframes lc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Advanced parameters panel */
.lolacore-advanced-panel {
    margin-top: 24px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-card);
    overflow: hidden;
}

.lolacore-advanced-panel summary {
    padding: 12px 18px;
    font-weight: 600;
    font-size: 0.95em;
    color: var(--lc-text-primary);
    cursor: pointer;
    background: var(--lc-paper);
    user-select: none;
}

.lolacore-advanced-panel summary:hover {
    background: var(--lc-paper-alt);
}

.lolacore-warning {
    margin: 16px 18px;
    padding: 14px 18px;
    background: #FFF8E7;
    border: 1px solid #F5D680;
    border-radius: var(--lc-radius-btn);
    font-size: 0.9em;
    color: #7A5C00;
    line-height: 1.55;
}

.lolacore-warning strong {
    display: block;
    margin-bottom: 6px;
}

.lolacore-warning ul {
    margin: 8px 0 10px 18px;
    padding: 0;
}

.lolacore-warning li {
    margin-bottom: 2px;
}

.lolacore-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-top: 1px solid var(--lc-border);
}

.lolacore-field label {
    flex: 1;
    font-size: 0.92em;
    color: var(--lc-text-primary);
}

.lolacore-field input[type="number"] {
    width: 100px;
    padding: 6px 10px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-btn);
    font-size: 0.92em;
    text-align: right;
}

.lolacore-field input[type="checkbox"] {
    margin-right: 8px;
}

.lolacore-field-actions {
    display: flex;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid var(--lc-border);
    justify-content: flex-end;
}

/* =============================================
   Skills — P0 Feedback (master toggle, beta notice, hint)
   ============================================= */

.lc-skills-master {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-card);
    background: var(--lc-white);
    margin-bottom: 18px;
}

.lc-skills-master-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lc-skills-master-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lc-skills-master-text strong {
    font-weight: 700;
    color: var(--lc-text-primary);
    font-size: 0.98em;
}

.lc-skills-master-text span {
    font-size: 0.88em;
    color: var(--lc-text-secondary);
}

.lc-skills-beta-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #FDF5E2;
    border: 1px solid rgba(212, 168, 67, 0.35);
    border-radius: var(--lc-radius-btn);
}

.lc-skills-beta-notice p {
    margin: 0;
    font-size: 0.9em;
    color: #7A5C00;
    line-height: 1.5;
}

.lc-skills-author-hint {
    margin: 0;
    padding: 8px 0 2px 0;
    border-top: 1px dashed var(--lc-border);
    font-size: 0.88em;
    color: var(--lc-text-secondary);
    line-height: 1.5;
}

.lc-skills-group-hint {
    font-family: var(--lc-font-primary);
    font-weight: 500;
    font-size: 11px;
    color: var(--lc-text-secondary);
    text-transform: none;
    letter-spacing: 0;
    margin-left: 6px;
}

/* Bundled rows have no toggle column — keep horizontal rhythm aligned */
.lc-skill-row--bundled {
    padding-left: 16px;
}

/* When master toggle is OFF, dim the content area and disable interaction */
.lc-skills-content--disabled {
    opacity: 0.55;
    pointer-events: none;
    filter: saturate(0.6);
    transition: opacity 0.2s, filter 0.2s;
}

.lc-playbooks-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
