/* The Add Target Database popout (db_platforms.js): platform tiles, then the guide and the form. */
.dbp .dbp-engine-toggle { margin: 0 0 0.9rem; }
.dbp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.dbp-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; min-height: 3.4rem;
  padding: 0.7rem 0.85rem; text-align: left; cursor: pointer; font-family: inherit;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; color: var(--gray-900);
}
.dbp-tile:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-light); }
.dbp-tile:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.dbp-tile .dbp-name { font-weight: 700; font-size: 0.84rem; line-height: 1.25; }
.dbp-tile:disabled { cursor: not-allowed; color: var(--gray-400); background: var(--gray-50); }
.dbp-tile.dbp-unsupported { color: var(--gray-500); background: var(--gray-50); }
.dbp-why:not(:empty) { margin-top: 0.8rem; }
.dbp-chosen { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.dbp-guide {
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 10px; padding: 0.7rem 0.9rem;
  font-size: 0.82rem; line-height: 1.5; color: var(--gray-700); margin-bottom: 0.9rem;
}
.dbp-guide p { margin: 0 0 0.4rem; }
.dbp-guide a { color: var(--blue); font-weight: 600; text-decoration: none; }
.dbp-guide-no { background: var(--amber-light); border-color: #fde68a; }
.dbp-note { color: var(--amber); }
.dbp-name-row { display: flex; align-items: flex-end; gap: 0.9rem; margin-bottom: 0.9rem; }
.dbp-name-row label { flex: 1; margin-bottom: 0; }
.dbp .dbp-mode-toggle { margin: 0; flex-shrink: 0; }
.dbp .dbp-mode-toggle button { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.dbp-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0.7rem; }
.dbp-fields .dbp-wide { grid-column: span 2; }
.dbp-read:empty { display: none; }
.dbp-read.dbp-bad { color: var(--red); }
.dbp-gateway { margin: 0.2rem 0 0.4rem; }
/* The prefix and why MySQL needs it, side by side (keeps the popout and Provision step 1 laptop-height). */
.dbp-prefix { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 0.8rem; align-items: start; margin-bottom: 0.6rem; }
.dbp-prefix label { margin-bottom: 0; }
.dbp-prefix .field-hint { margin: 1.2rem 0 0; }
.dbp-switch { display: flex; align-items: center; gap: 0.5rem; color: var(--gray-500); margin-bottom: 0.2rem; }
.dbp-switch input { width: auto; }
.dbp-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
@media (max-width: 640px) {
  .dbp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dbp-fields { grid-template-columns: 1fr; }
  .dbp-name-row { flex-direction: column; align-items: stretch; }
  .dbp-prefix { grid-template-columns: 1fr; }
  .dbp-prefix .field-hint { margin-top: 0; }
  .dbp-fields .dbp-wide { grid-column: auto; }
}
/* Provision Database, step 1 (provision_platform.js): the chosen platform's rules, beside the form. */
.provision-platform-note {
  background: var(--amber-light); border: 1px solid #fde68a; border-radius: 10px; padding: 0.6rem 0.8rem;
  font-size: 0.8rem; line-height: 1.45; color: var(--amber); margin-bottom: 0.9rem;
}
#provision-db-mode-toggle { margin: 0 0 0.9rem; }

/* Add a connection, step 3 (sync_database.js): a MySQL target's prefix, fixed in front of the name box. */
.sync-name-row { display: flex; align-items: stretch; margin-top: 0.25rem; }
.sync-name-row input { margin-top: 0; min-width: 0; flex: 1; }
.sync-prefix-chip {
  display: flex; align-items: center; padding: 0 0.6rem; font-weight: 600; color: var(--gray-700);
  background: var(--gray-100); border: 1px solid var(--gray-300); border-right: none; border-radius: 10px 0 0 10px;
}
.sync-prefix-chip:not(.hidden) + input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.sync-target-hint:empty { display: none; }
.sync-target-hint { margin: -0.4rem 0 0.7rem; }
