/* YAML to Dart - mobile-first, unique layout */
.bmc-yaml .y2d-tool {
    --y2d-bg: #f8fafb;
    --y2d-surface: #ffffff;
    --y2d-border: #e2e8f0;
    --y2d-border-focus: #0d9488;
    --y2d-text: #0f172a;
    --y2d-muted: #64748b;
    --y2d-accent: #0d9488;
    --y2d-accent-hover: #0f766e;
    --y2d-radius: 12px;
    --y2d-radius-sm: 8px;
    --y2d-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --y2d-shadow-focus: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

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

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

.y2d-options-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--y2d-bg);
    border-bottom: 1px solid var(--y2d-border);
}

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

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

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

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

.y2d-class-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

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

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

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

.y2d-panes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 280px;
}

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

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

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

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

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

.y2d-editor::placeholder {
    color: var(--y2d-muted);
    opacity: 0.85;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.y2d-status.y2d-status-success {
    color: #059669;
}

.y2d-status.y2d-status-error {
    color: #dc2626;
}
