/* AIOS Plugin UI Xenon composition rules v2 (contract v0.5.28).
   Plugin UI is mounted directly inside the AIOS Shell document (no iframe,
   no sandbox), so it already inherits the Shell's Xenon stylesheets loaded
   in index.html. This file only adds plugin-specific composition rules on
   top of that shared stylesheet; it does not replace Xenon. */
.aios-plugin-page { padding: 0; }
.aios-plugin-page .panel { margin-bottom: 18px; box-shadow: none; }
.aios-plugin-page .panel:last-child { margin-bottom: 0; }
.aios-plugin-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aios-plugin-toolbar .form-control { flex: 1 1 320px; min-width: 220px; }
.aios-plugin-toolbar .btn { flex: 0 0 auto; }
.aios-plugin-empty { padding: 28px 12px; text-align: center; color: #979898; }
.aios-plugin-error { margin: 0 0 14px; }
.aios-plugin-provider-state { float: right; color: #979898; font-size: 11px; margin-top: 2px; font-weight: 400; }
.aios-plugin-confirm { display: inline-flex; gap: 6px; align-items: center; }
.aios-plugin-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.aios-plugin-note-time { white-space: nowrap; color: #979898; font-size: 12px; }
.aios-plugin-page .table { margin-bottom: 0; }
.aios-plugin-page .table-responsive { margin-bottom: 0; }
.aios-plugin-page .dx-datagrid { font-family: inherit; border: 1px solid #eee; }
.aios-plugin-page .dx-datagrid .dx-header-row > td { font-weight: 600; color: #2c2e2f; background: #fafafa; }
.aios-plugin-page .dx-datagrid .dx-row > td { vertical-align: middle; }
@media (max-width: 600px) {
  .aios-plugin-toolbar { display: block; }
  .aios-plugin-toolbar .form-control, .aios-plugin-toolbar .btn, .aios-plugin-confirm { width: 100%; margin-bottom: 8px; }
  .aios-plugin-confirm .btn { width: auto; }
}

/* v0.5.5 plugin interaction primitives */
.aios-notes-compose .form-control { min-width: 0; }
.aios-notes-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aios-notes-heading .panel-title { min-width: 0; }
.aios-notes-heading-actions { flex: 0 0 auto; }
.aios-notes-heading-actions .badge { margin-left: 5px; background: rgba(255,255,255,.25); }
.aios-notes-table-body { padding: 0; }
.aios-notes-table { margin: 0; table-layout: fixed; }
.aios-notes-table > thead > tr > th { background: #fafafa; border-bottom-width: 1px; font-weight: 600; }
.aios-notes-table > tbody > tr { transition: background-color .12s ease; }
.aios-notes-table > tbody > tr > td { vertical-align: middle; }
.aios-notes-select { width: 46px; text-align: center; }
.aios-notes-date { width: 180px; }
.aios-notes-action { width: 54px; text-align: center; }
.aios-row-delete { opacity: 0; transform: translateY(1px); transition: opacity .12s ease, transform .12s ease; }
.aios-notes-table tbody tr:hover .aios-row-delete,
.aios-notes-table tbody tr:focus-within .aios-row-delete { opacity: 1; transform: none; }
.aios-check { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin: 0; cursor: pointer; position: relative; }
.aios-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.aios-check span { width: 16px; height: 16px; border: 1px solid #c8c8c8; border-radius: 2px; background: #fff; position: relative; box-sizing: border-box; }
.aios-check input:checked + span { background: var(--aios-primary, #2c7be5); border-color: var(--aios-primary, #2c7be5); }
.aios-check input:checked + span:after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.aios-check input:indeterminate + span { background: var(--aios-primary, #2c7be5); border-color: var(--aios-primary, #2c7be5); }
.aios-check input:indeterminate + span:after { content: ""; position: absolute; left: 3px; right: 3px; top: 6px; height: 2px; background: #fff; }
.aios-check input:focus + span { box-shadow: 0 0 0 2px rgba(44,132,255,.18); }
body.aios-modal-open { overflow: hidden; }
.aios-plugin-modal[hidden] { display: none !important; }
.aios-plugin-modal { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 20px; }
.aios-plugin-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.aios-plugin-modal-dialog { position: relative; z-index: 1; width: 100%; max-width: 480px; }
.aios-plugin-modal-dialog .modal-content { box-shadow: 0 8px 30px rgba(0,0,0,.22); border: 0; }
.aios-plugin-modal-dialog .modal-header { padding: 16px 18px; }
.aios-plugin-modal-dialog .modal-body { padding: 18px; font-size: 14px; }
.aios-plugin-modal-dialog .modal-footer { padding: 12px 18px; }
.aios-modal-message { margin: 0; }
.aios-echo-status-row { margin-bottom: 16px; }
.aios-echo-status { border: 1px solid #eee; background: #fafafa; padding: 12px 14px; min-height: 64px; }
.aios-echo-status span { display: block; color: #979898; font-size: 11px; text-transform: uppercase; }
.aios-echo-status strong { display: block; margin-top: 5px; font-size: 16px; }
.aios-echo-json { margin: 0; max-height: 280px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.aios-message-host, .aios-run-host { margin-bottom: 0; }
.aios-message-fallback.input-lg, .aios-run-fallback.btn-lg { height: 46px; }
.aios-result { margin-top: 4px; }
@media (max-width: 767px) {
  .aios-message-host { margin-bottom: 10px; }
}
@media (hover: none) { .aios-row-delete { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .aios-notes-heading { align-items: flex-start; flex-direction: column; }
  .aios-notes-heading-actions { width: 100%; }
  .aios-notes-heading-actions .btn { width: 100%; }
  .aios-notes-date { width: 135px; }
  .aios-notes-action { width: 44px; }
  .aios-plugin-modal { padding: 10px; }
}
