/*
 * DarkMatter AI Evolution
 * Front-end styling for the [ai_evolution] shortcode output.
 */

.dm-ai-evolution-wrap {
    position: relative;
    margin: 1.25rem 0;
    padding: 1rem;
    background: linear-gradient(180deg, #060606 0%, #0d0d0d 100%);
    border: 1px solid #1d1d1d;
    border-radius: 10px;
    box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.02), 0 0 18px rgba(0, 0, 0, 0.35);
}

.dm-ai-evolution-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 10px;
    box-shadow: inset 0 0 40px rgba(255, 0, 90, 0.05);
}

.dm-ai-evolution-heading {
    flex: 1; /* takes all available space */
    margin: 0 0 0.75rem;
    color: #f3f3f3;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dm-ai-evolution-scroll {
    display: block;
    width: 100%;
    min-height: 220px;
    padding: 1rem;
    background: #020202;
    color: #7dffb3;
    border: 1px solid #252525;
    border-radius: 8px;
    box-sizing: border-box;
    resize: vertical;
    overflow-y: auto;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre;
    box-shadow: inset 0 0 18px rgba(0, 255, 145, 0.08);
}

.dm-ai-evolution-scroll:focus {
    outline: none;
    border-color: #3d3d3d;
    box-shadow: inset 0 0 18px rgba(0, 255, 145, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.dm-ai-evolution-scroll {
    width: 100%;
    background: #050505;
    color: #00ff88;
    font-family: Consolas, monospace;
    font-size: 13px;
    cursor: default;
    padding: 12px;
    border: 1px solid #111;
    resize: vertical;
    overflow-y: auto;

    /* remove textarea "feel" */
    outline: none;
    box-shadow: inset 0 0 20px rgba(0,255,136,0.08);
}

/* Webkit Scrollbar */
.dm-ai-evolution-scroll::-webkit-scrollbar {
    width: 8px;
}

.dm-ai-evolution-scroll::-webkit-scrollbar-track {
    background: #050505;
}

.dm-ai-evolution-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(#00ff88, #009955);
    border-radius: 4px;
}

.dm-ai-evolution-scroll::-webkit-scrollbar-thumb:hover {
    background: #00ffaa;
}

/* Firefox */
.dm-ai-evolution-scroll {
    scrollbar-width: thin;
    scrollbar-color: #00ff88 #050505;
}


/* =========================================
   TOGGLE HEADER
========================================= */

.dm-ai-evolution-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

/* Triangle */
.dm-ai-evolution-triangle {
    display: flex;
    align-items: center;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #ff3c3c; /* red */
    transition: transform 0.25s ease;
}

/* Rotate when open */
.dm-ai-evolution-wrap.open .dm-ai-evolution-triangle {
    transform: rotate(180deg);
}

/* =========================================
   CONTENT COLLAPSE
========================================= */

.dm-ai-evolution-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

/* Expanded */
.dm-ai-evolution-wrap.open .dm-ai-evolution-content {
    max-height: 1000px; /* large enough to reveal */
    margin-top: 0.75rem;
}

/* Optional: smoother reveal feel */
.dm-ai-evolution-wrap.open .dm-ai-evolution-scroll {
    opacity: 1;
    transform: translateY(0);
}

.dm-ai-evolution-scroll {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}