/* YAML to C# - mobile-first, sleek layout (unique from other YAML tools) */
.bmc-yaml .y2cs-tool {
    --y2cs-bg: #faf8fc;
    --y2cs-surface: #ffffff;
    --y2cs-border: #e8e4ec;
    --y2cs-border-focus: #68217a;
    --y2cs-text: #1a1625;
    --y2cs-muted: #6b6374;
    --y2cs-accent: #68217a;
    --y2cs-accent-hover: #512b5a;
    --y2cs-radius: 14px;
    --y2cs-radius-sm: 10px;
    --y2cs-shadow: 0 2px 8px rgba(104, 33, 122, 0.06);
    --y2cs-shadow-focus: 0 0 0 3px rgba(104, 33, 122, 0.18);
}

.y2cs-tool {
    margin-bottom: 2rem;
}

.y2cs-card {
    width: 100%;
    background: var(--y2cs-surface);
    border: 1px solid var(--y2cs-border);
    border-radius: var(--y2cs-radius);
    box-shadow: var(--y2cs-shadow);
    overflow: hidden;
}

.y2cs-options {
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, var(--y2cs-bg) 0%, var(--y2cs-surface) 100%);
    border-bottom: 1px solid var(--y2cs-border);
}

.y2cs-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: center;
}

.y2cs-class-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--y2cs-muted);
    letter-spacing: 0.03em;
}

.y2cs-class-input {
    min-width: 120px;
    max-width: 180px;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--y2cs-text);
    background: var(--y2cs-surface);
    border: 1px solid var(--y2cs-border);
    border-radius: var(--y2cs-radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.y2cs-class-input:focus {
    outline: none;
    border-color: var(--y2cs-border-focus);
    box-shadow: var(--y2cs-shadow-focus);
}

.y2cs-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--y2cs-text);
    user-select: none;
}

.y2cs-check input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--y2cs-accent);
    cursor: pointer;
}

.y2cs-check-label {
    line-height: 1.2;
}

/* Panes: stack on mobile, side-by-side on tablet+ */
.y2cs-panes {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 260px;
}

@media (min-width: 768px) {
    .y2cs-panes {
        grid-template-columns: 1fr 1fr;
        min-height: 340px;
    }
}

.y2cs-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-bottom: 1px solid var(--y2cs-border);
}

@media (min-width: 768px) {
    .y2cs-pane:first-child {
        border-bottom: none;
        border-right: 1px solid var(--y2cs-border);
    }
}

.y2cs-pane-label {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--y2cs-muted);
    background: var(--y2cs-bg);
    border-bottom: 1px solid var(--y2cs-border);
}

.y2cs-editor {
    flex: 1;
    min-height: 420px;
    padding: 1rem 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--y2cs-text);
    background: var(--y2cs-surface);
    border: none;
    resize: none;
    transition: background-color 0.2s ease;
}

.y2cs-editor::placeholder {
    color: var(--y2cs-muted);
    opacity: 0.9;
}

.y2cs-editor:focus {
    outline: none;
    background: #fefefe;
}

.y2cs-editor-output {
    cursor: default;
    color: var(--y2cs-text);
}

.y2cs-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: var(--y2cs-bg);
    border-top: 1px solid var(--y2cs-border);
}

.y2cs-actions-sep {
    width: 1px;
    height: 1.5rem;
    margin: 0 0.25rem;
    background: var(--y2cs-border);
    flex-shrink: 0;
}

.y2cs-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: var(--y2cs-radius-sm);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.y2cs-btn-primary {
    color: #fff;
    background: var(--y2cs-accent);
}

.y2cs-btn-primary:hover {
    background: var(--y2cs-accent-hover);
}

.y2cs-btn-secondary {
    color: var(--y2cs-text);
    background: var(--y2cs-surface);
    border: 1px solid var(--y2cs-border);
}

.y2cs-btn-secondary:hover {
    background: var(--y2cs-border);
}

.y2cs-btn-outline {
    color: var(--y2cs-text);
    background: transparent;
    border: 1px solid var(--y2cs-border);
}

.y2cs-btn-outline:hover {
    background: var(--y2cs-surface);
    border-color: var(--y2cs-muted);
}

.y2cs-btn-ghost {
    color: var(--y2cs-muted);
    background: transparent;
}

.y2cs-btn-ghost:hover {
    color: var(--y2cs-text);
    background: var(--y2cs-border);
}

.y2cs-status {
    padding: 0 1.25rem 1rem;
    font-size: 0.8125rem;
    color: var(--y2cs-muted);
    min-height: 1.25rem;
}

.y2cs-status.y2cs-status-success {
    color: #0d7d4a;
}

.y2cs-status.y2cs-status-error {
    color: #c41e3a;
}
