/* --------------------------------------------------------------------------
   Tool: full-width card, left input / right result
   -------------------------------------------------------------------------- */
.yaml-schema-tool {
    margin-bottom: 2rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tool-card-col {
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.tool-card-input {
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.tool-card-result {
    flex: 1;
}

.pane-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    background: var(--surface-muted, #f8fafc);
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.pane-label-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pane-label-icon svg {
    width: 18px;
    height: 18px;
    color: var(--accent, #6366f1);
}

.pane-label-hint {
    font-weight: 400;
    color: var(--text-muted, #94a3b8);
    font-size: 0.75rem;
}

.pane-inner {
    padding: 0;
    min-height: 140px;
}

.pane-editor {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-main, #0f172a);
    background: var(--surface, #ffffff);
    border: none;
    resize: vertical;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.pane-editor::placeholder {
    color: var(--text-muted, #94a3b8);
}

.pane-inner--code {
    padding: 1rem;
    min-height: 180px;
    max-height: 420px;
    overflow: auto;
}

.schema-output {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-main, #0f172a);
    white-space: pre-wrap;
    word-break: break-word;
}

.schema-output.error {
    color: var(--error, #b91c1c);
}

.schema-output.success {
    border-left: 3px solid var(--success, #059669);
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.schema-code {
    font: inherit;
}

.pane-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    background: var(--surface-muted, #f8fafc);
    border-top: 1px solid var(--border, #e2e8f0);
}

.pane-status {
    color: var(--text-muted, #64748b);
}

.pane-status.copied {
    color: var(--success, #059669);
}

/* Ghost button */
.btn-ghost {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.btn-ghost:hover {
    color: var(--accent, #6366f1);
    background: rgba(99, 102, 241, 0.08);
}

/* Related links: compact strip */
.related-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
}

.related-links-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    margin-right: 0.25rem;
}

.related-links a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent, #6366f1);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.related-links a:hover {
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.1);
}

/* --------------------------------------------------------------------------
   Desktop: side-by-side (left input, right result)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .tool-card {
        flex-direction: row;
        min-height: 420px;
    }

    .tool-card-col {
        flex: 1;
        min-width: 0;
        min-height: 420px;
    }

    .tool-card-input {
        border-bottom: none;
        border-right: 1px solid var(--border, #e2e8f0);
    }

    .pane-inner {
        min-height: 200px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .pane-editor {
        flex: 1;
        min-height: 240px;
    }

    .pane-inner--code {
        flex: 1;
        min-height: 200px;
        max-height: none;
    }
}
