/* PES Monaco code editor shells */

.pes-code-shell {
    --pes-ed-bg: #0a1628;
    --pes-ed-bar: #06101f;
    --pes-ed-border: rgba(255, 255, 255, 0.1);
    --pes-ed-sky: #6eb6ef;
    --pes-ed-steel: #3d7ab5;
    border-radius: 16px;
    border: 1px solid var(--pes-ed-border);
    background: var(--pes-ed-bg);
    box-shadow: 0 24px 60px rgba(6, 16, 31, 0.35);
    overflow: hidden;
    margin: 1.5rem 0;
}

.pes-code-shell__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--pes-ed-bar);
    border-bottom: 1px solid var(--pes-ed-border);
}

.pes-code-shell__dots {
    display: inline-flex;
    gap: 6px;
}
.pes-code-shell__dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}
.pes-code-shell__dots i:nth-child(1) { background: #ff5f57; }
.pes-code-shell__dots i:nth-child(2) { background: #febc2e; }
.pes-code-shell__dots i:nth-child(3) { background: #28c840; }

.pes-code-shell__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
}

.pes-code-shell__title svg {
    width: 14px;
    height: 14px;
    color: var(--pes-ed-sky);
}

.pes-code-shell__langs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
    align-items: center;
}

.pes-code-shell__langs label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    margin-right: 2px;
}

.pes-code-shell__select,
.pes-code-shell__tab {
    border: 0;
    border-radius: 6px;
    padding: 6px 10px;
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.pes-code-shell__select {
    appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236eb6ef' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.pes-code-shell__tab.active,
.pes-code-shell__tab:hover {
    background: var(--pes-ed-steel);
    color: #fff;
}

.pes-code-shell__copy {
    border: 1px solid var(--pes-ed-border);
    border-radius: 6px;
    padding: 6px 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.72rem;
    cursor: pointer;
}
.pes-code-shell__copy:hover {
    background: rgba(255, 255, 255, 0.06);
}

.pes-code-shell__frame {
    min-height: 220px;
    height: 320px;
}

.pes-code-shell--article .pes-code-shell__frame {
    height: 280px;
}

.pes-code-shell--lab .pes-code-shell__frame {
    height: 360px;
}

.pes-lab-block {
    padding: 72px 0;
    background: #06101f;
    color: #fff;
}

.pes-lab-block .pes-section-head h2 {
    color: #fff;
}

.pes-lab-block .pes-section-head p:last-child {
    color: rgba(255, 255, 255, 0.6);
}

.pes-lab-block .pes-eyebrow {
    color: #6eb6ef;
}

/* Hide original pre while upgrading */
.story-content pre.pes-code-upgrading {
    opacity: 0.35;
}

.story-content .pes-code-shell {
    max-width: 100%;
}

@media (max-width: 640px) {
    .pes-code-shell__langs { margin-left: 0; width: 100%; }
    .pes-code-shell__frame { height: 260px; }
}
