/* Connector proxy-resources: schema list + agent prompt (section) and the schema editor (modal). */

/* Schema card — its description is revealed as a styled tooltip on hover/focus,
   not as always-visible subtext. */
.schema-card { position: relative; }
.schema-tip {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(100% + 8px);
    z-index: 50;
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: var(--ava-navy-deep);
    border: 1px solid var(--ava-line-strong);
    box-shadow: var(--shadow-panel);
    color: var(--ava-text-2);
    font: 400 12px var(--font-sans);
    line-height: 1.45;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity var(--ava-dur-1) var(--ava-ease),
                transform var(--ava-dur-1) var(--ava-ease),
                visibility var(--ava-dur-1) var(--ava-ease);
    pointer-events: none;
}
.schema-card:hover .schema-tip,
.schema-card:focus-within .schema-tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.schema-section {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.schema-section .con-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.schema-pill-wrap {
    display: inline-flex;
    align-items: stretch;
    gap: 4px;
}

.schema-pill-del {
    border: none;
    border-radius: var(--ava-radius-sm);
    padding: 0 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.schema-prompt {
    min-height: 120px;
}

.schema-prompt-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* ---- Editor modal ---- */

.schema-editor .schema-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.schema-editor .schema-hint {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--ava-text-muted);
}

.schema-editor .schema-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 10px;
}

.schema-editor .schema-col-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schema-editor .schema-col-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 12px;
    border: 1px solid var(--ava-line);
    border-radius: var(--ava-radius-sm);
}

.schema-editor .schema-col-toggle {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.schema-editor .schema-primary-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--ava-text);
}

.schema-editor .schema-raw {
    min-height: 320px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.schema-editor .schema-errors {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: var(--ava-radius-sm);
    background: color-mix(in srgb, var(--ava-red) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--ava-red) 30%, transparent);
}

.schema-editor .schema-errors ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.schema-editor .schema-discard-text {
    margin-right: auto;
    font-weight: 700;
    color: var(--ava-text);
}
