/**
 * Single-paste pairing panel.
 *
 * Self-contained on purpose. This panel renders on two screens with different
 * stylesheets: the Settings tab (admin.css, WordPress admin conventions) and
 * the setup wizard (setup-wizard.css, a custom full-page layout that centres
 * its text and does not set border-box). Borrowing either would leave the panel
 * broken on the other, so everything it needs lives here, including the resets
 * that stop the wizard's rules leaking in.
 *
 * @since 2.5.4
 */

.migro-pair {
    /* The wizard centres card text. Long-form copy and form controls read
       badly centred, so the panel opts out for its whole subtree. */
    text-align: left;
    margin: 0 0 24px 0;
}

.migro-pair *,
.migro-pair *::before,
.migro-pair *::after {
    /* The wizard page is standalone and does not inherit wp-admin's global
       border-box. Without this, card padding is added to the flex basis and the
       two columns wrap to a single stack. */
    box-sizing: border-box;
}

.migro-pair-title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.migro-pair-lede,
.migro-pair-hint {
    margin: 0 0 12px 0;
    color: #50575e;
    font-size: 13px;
    line-height: 1.5;
}

.migro-pair-lede {
    margin-bottom: 16px;
}

.migro-pair-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.migro-pair-card {
    flex: 1 1 280px;
    min-width: 0;
    padding: 16px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
}

.migro-pair-card h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.migro-pair-card p {
    margin: 0 0 10px 0;
}

.migro-pair-card p:last-child {
    margin-bottom: 0;
}

/* One line, monospace, scrolls horizontally. A pairing code is copied, never
   read, so height spent showing all of it is height wasted. */
.migro-pair-code {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 10px 0;
    padding: 7px 9px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #f6f7f7;
    color: #1d2327;
}

.migro-pair-code:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.migro-pair-input {
    padding: 6px 9px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    flex: 1 1 220px;
    min-width: 0;
    font-size: 13px;
}

.migro-pair-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.migro-pair-btn {
    display: inline-block;
    flex: 0 0 auto;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid #2271b1;
    border-radius: 4px;
    background: #f6f7f7;
    color: #2271b1;
    cursor: pointer;
}

.migro-pair-btn:hover:not(:disabled) {
    background: #f0f0f1;
}

.migro-pair-btn.is-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.migro-pair-btn.is-primary:hover:not(:disabled) {
    background: #135e96;
    border-color: #135e96;
}

.migro-pair-btn:disabled {
    opacity: .6;
    cursor: default;
}

.migro-pair-link {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 13px;
    color: #d63638;
    text-decoration: underline;
    cursor: pointer;
}

.migro-pair-countdown {
    font-size: 12px;
    color: #50575e;
}

/* Notices. Deliberately not WordPress's .notice: the wizard does not load
   wp-admin's stylesheet, so a .notice there renders as unstyled text. */
.migro-pair-note {
    margin: 0 0 14px 0;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-left: 4px solid #72aee6;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.migro-pair-note p {
    margin: 0 0 8px 0;
}

.migro-pair-note p:last-child {
    margin-bottom: 0;
}

.migro-pair-note.is-success {
    border-left-color: #00a32a;
}

.migro-pair-note.is-warning {
    border-left-color: #dba617;
}

.migro-pair-note.is-error {
    border-left-color: #d63638;
}

/* Results sit inside a card, where the outer margin would double up. */
.migro-pair-card .migro-pair-note {
    margin: 10px 0 0 0;
}

/* Inline confirmation. A dialog would need each screen's modal styles and its
   focus handling; keeping the question next to the paste box that raised it
   works identically on both screens and keeps the reason visible while the
   admin decides. */
.migro-pair-confirm ul {
    margin: 0 0 10px 18px;
    padding: 0;
    list-style: disc;
}

.migro-pair-confirm li {
    margin-bottom: 6px;
}
