/* CPay presentation layer: existing store configuration and routes are retained. */
.cpay-layout-panel { gap: 16px; }
.cpay-layout-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 2px; }
.cpay-layout-heading h3 { margin: 0; font-size: 21px; }
.cpay-layout-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.cpay-layout-heading .btn:disabled { opacity: .5; cursor: not-allowed; }
.cpay-layout-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cpay-layout-title > .btn { width: 40px; min-width: 40px; padding: 0; }
.cpay-layout-table { border: 1.5px solid var(--outline); border-radius: 12px; background: var(--white); overflow: hidden; }
.cpay-layout-table-head, .cpay-layout-table-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(140px, 1fr) minmax(130px, .9fr) minmax(150px, 1fr) 112px; gap: 14px; align-items: center; padding: 0 16px; }
.cpay-layout-table-head { min-height: 44px; color: var(--muted); background: var(--surface-low); font-size: 12px; }
.cpay-layout-table-row { min-height: 102px; border-top: 1px solid var(--outline); }
.cpay-layout-table-row > div { min-width: 0; }
.cpay-layout-table-row strong { font-size: 14px; overflow-wrap: anywhere; }
.cpay-layout-table-row small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted-2); line-height: 1.5; }
.cpay-layout-terminal { display: flex; align-items: center; gap: 12px; }
.cpay-layout-terminal > span, .cpay-layout-route > span { width: 42px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.cpay-layout-row-action { display: flex; justify-content: flex-end; }
.cpay-layout-state { display: inline-flex; align-items: center; width: fit-content; padding: 7px 9px; border: 1px solid var(--outline); border-radius: 8px; color: var(--muted); background: var(--surface-low); font-size: 12px; line-height: 1.4; }
.cpay-layout-state.ready { color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, var(--outline)); background: var(--green-soft); }
.cpay-layout-notice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--outline); border-radius: 10px; background: var(--surface-low); }
.cpay-layout-notice > .material-symbols-outlined { color: var(--primary); flex: 0 0 auto; }
.cpay-layout-notice p { flex: 1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.cpay-layout-notice .btn { flex: 0 0 auto; }
.cpay-layout-route { display: flex; gap: 12px; align-items: center; border: 1px solid var(--outline); padding: 14px 16px; border-radius: 12px; background: var(--surface-low); }
.cpay-layout-route > .material-symbols-outlined { color: var(--primary); margin-inline: 7px; }
.cpay-layout-route strong { font-size: 15px; }
.cpay-layout-route small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.cpay-layout-section { min-width: 0; border: 1.5px solid var(--outline); border-radius: 10px; background: var(--surface-low); }
.cpay-layout-section > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; list-style: none; cursor: pointer; }
.cpay-layout-section > summary::-webkit-details-marker, .cpay-layout-notes > summary::-webkit-details-marker { display: none; }
.cpay-layout-section > summary strong { font-size: 14px; }
.cpay-layout-section > summary > span { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); text-align: right; }
.cpay-layout-section[open] > summary .material-symbols-outlined { transform: rotate(180deg); }
.cpay-layout-section > .pos-form-grid, .cpay-layout-section > .pos-runtime-grid { padding: 0 14px 14px; }
.cpay-layout-section > .pos-state-card { margin: 0 14px 14px; }
.cpay-layout-basic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cpay-layout-form { padding: 16px; gap: 16px; }
.cpay-layout-form .pos-checkbox-field input { width: 26px; height: 26px; min-height: 26px; margin: 12px 0; }
.cpay-layout-cancel { justify-self: end; }
.cpay-layout-notes { margin-top: 12px; }
.cpay-layout-notes > summary { cursor: pointer; font-size: 13px; font-weight: 900; color: var(--muted); }
.cpay-layout-notes > summary::after { content: "⌄"; margin-left: 10px; }
.cpay-layout-notes > p { margin-top: 9px; }
.cpay-layout-diagnostics > .pos-settings-summary { margin: 0 14px 14px; background: var(--white); }
.cpay-layout-target { margin: 0 14px 14px; padding: 11px 12px; display: flex; align-items: center; gap: 8px; border-radius: 8px; background: var(--primary-dim); color: var(--muted); font-size: 12px; }
@media (max-width: 1120px) {
  .cpay-layout-table-head, .cpay-layout-table-row { grid-template-columns: minmax(130px, 1.2fr) minmax(120px, 1fr) minmax(112px, .9fr) minmax(110px, 1fr) 102px; gap: 8px; padding-inline: 12px; }
  .cpay-layout-terminal { gap: 8px; }
  .cpay-layout-terminal > span { width: 34px; height: 40px; }
}
@media (max-width: 760px) {
  .cpay-layout-table-head { display: none; }
  .cpay-layout-table-row { grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; }
  .cpay-layout-table-row > .cpay-layout-terminal { grid-column: 1 / -1; }
  .cpay-layout-row-action { grid-column: 2; }
  .cpay-layout-heading, .cpay-layout-notice { align-items: flex-start; flex-wrap: wrap; }
  .cpay-layout-notice p { flex-basis: calc(100% - 40px); }
  .cpay-layout-notice .btn { margin-left: auto; }
  .cpay-layout-section > summary > span { max-width: 45%; }
  .cpay-layout-route { flex-wrap: wrap; }
  .cpay-layout-basic { grid-template-columns: 1fr; }
}

/* Adding a terminal is currently an isolated, non-saving interface preview. */
.cpay-preview-flow { align-self: center; padding: 12px 14px; border-radius: 10px; background: var(--surface-low); }
.cpay-preview-flow strong { font-size: 13px; }
.cpay-preview-flow p, .cpay-preview-help { margin: 5px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.cpay-preview-actions { justify-content: flex-end; }
.cpay-add-preview .btn:disabled { opacity: .48; cursor: not-allowed; }
.cpay-add-preview input:disabled { opacity: .6; }
