/* Pastebin UI — homepage create box, view page, code block + gutter.
   Self-contained: doesn't inherit from .msg / .urlbox / .button site styles. */

/* =====================================================================
   Homepage "create a paste" section
   ===================================================================== */
.paste-create {
    max-width: 820px;
    /* Top margin is 0: the divider inside (.paste-or) supplies the breathing
       room above so it sits centred between the upload form and the paste form. */
    margin: 0 auto 28px;
    padding: 0 10px;
    clear: both;                /* defensive: don't pick up floats from the upload form above */
    text-align: left;
    font: 14px/1.4 -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2d3037;
}
/* Flex divider — text centered between two rules. Immune to any parent
   text-align (which is what was right-aligning the previous inline-block layout). */
.paste-create .paste-or {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    color: #98a0aa;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    /* html.upload.inc.php ends with a 70px "clear" spacer above us, so the
       visible gap above the divider is already ~70px. Mirror it on the bottom
       so the divider sits visually centred between the upload widget above
       and the paste form below. */
    margin: 0 0 70px;
    box-sizing: border-box;
}
.paste-create .paste-or::before,
.paste-create .paste-or::after {
    content: "";
    flex: 1 1 0;
    height: 1px;
    background: #e4e7eb;
}
.paste-create .paste-or span {
    flex: 0 0 auto;
    white-space: nowrap;
}

.paste-create-form { margin: 0; }
.paste-create .paste-field { margin-bottom: 8px; }
.paste-create .paste-title-input,
.paste-create textarea,
.paste-create input[type=text],
.paste-create input[type=number],
.paste-create select {
    box-sizing: border-box;
    border: 1px solid #cfd5dc;
    border-radius: 4px;
    background: #fff;
    color: #2d3037;
    font: inherit;
    padding: 6px 8px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.paste-create .paste-title-input { width: 100%; }
.paste-create textarea {
    width: 100%;
    min-height: 180px;
    font: 13px/1.5 "Droid Sans Mono", Consolas, Menlo, Monaco, monospace;
    resize: vertical;
}
.paste-create input:focus,
.paste-create textarea:focus,
.paste-create select:focus {
    outline: none;
    border-color: #5a9cf3;
    box-shadow: 0 0 0 3px rgba(90,156,243,.18);
}

.paste-create .paste-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-top: 6px;
}
.paste-create .paste-row-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 180px;
    min-width: 140px;
}
.paste-create .paste-row-field span {
    font-size: 12px;
    color: #5b6470;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.paste-create .paste-row-narrow { flex: 0 1 120px; }

.paste-create .paste-submit {
    margin-top: 12px;
    text-align: right;
}
.paste-create-btn {
    display: inline-block;
    border: 0;
    border-radius: 5px;
    background: #2e7d32;
    color: #fff;
    font: 600 14px/1 -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    padding: 11px 22px;
    cursor: pointer;
    transition: background-color .15s ease, transform .08s ease, box-shadow .15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.paste-create-btn:hover  { background: #256528; }
.paste-create-btn:active { transform: translateY(1px); box-shadow: none; }
.paste-create-btn:focus  { outline: 3px solid rgba(46,125,50,.35); outline-offset: 1px; }

/* =====================================================================
   Paste view page
   ===================================================================== */
.paste-page {
    max-width: 1000px;
    margin: 18px auto 32px;
    padding: 0 16px;
    text-align: left;
    font: 14px/1.4 -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2d3037;
}

.paste-head {
    border-bottom: 1px solid #e4e7eb;
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.paste-title {
    font: 600 22px/1.25 -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0 0 6px;
    color: #1d2027;
    word-break: break-word;
}
.paste-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12.5px;
    color: #6b7480;
}
.paste-meta span { white-space: nowrap; }
.paste-meta-tag {
    background: #eef2f7;
    color: #364152;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* "Your paste is live" success callout (when ?created=1) */
.paste-notice {
    margin: 0 0 14px;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid #b8dbc1;
    background: #ecf7ee;
    color: #1b4d22;
}
.paste-notice p { margin: 4px 0 8px; }
.paste-notice .paste-notice-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
}

/* Link box (share URL + deletion URL) */
.paste-linkbox {
    display: flex;
    gap: 6px;
    margin: 12px 0;
}
.paste-share { margin-bottom: 14px; }
.paste-linkbox-input {
    flex: 1 1 auto;
    box-sizing: border-box;
    border: 1px solid #cfd5dc;
    border-radius: 5px 0 0 5px;
    border-right-width: 0;
    background: #fff;
    color: #2d3037;
    font: 13px/1.4 "Droid Sans Mono", Consolas, Menlo, Monaco, monospace;
    padding: 8px 10px;
    min-width: 0; /* prevent flex blowout */
}
.paste-linkbox-input:focus { outline: none; box-shadow: 0 0 0 2px rgba(90,156,243,.25); }
.paste-linkbox-copy {
    border: 1px solid #cfd5dc;
    border-radius: 0 5px 5px 0;
    background: #f3f5f8;
    color: #2d3037;
    font: 600 13px/1 -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    padding: 0 14px;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease;
}
.paste-linkbox-copy:hover { background: #e6eaf0; }
.paste-linkbox-copy.copied { background: #2e7d32; color: #fff; border-color: #246a28; }

/* Toolbar — Copy / Raw / Download / Clone / Delete */
.paste-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
}
.paste-inline-form { display: inline; margin: 0; }
.paste-btn {
    display: inline-block;
    border: 1px solid #cfd5dc;
    border-radius: 5px;
    background: #f6f7f9;
    color: #2d3037;
    font: 600 12.5px/1 -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    padding: 7px 12px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.paste-btn:hover { background: #e9ecf1; color: #1d2027; }
.paste-btn:active { transform: translateY(1px); }
.paste-btn:focus { outline: 2px solid rgba(90,156,243,.45); outline-offset: 1px; }
.paste-btn.copied { background: #2e7d32; color: #fff; border-color: #246a28; }
.paste-btn-danger { color: #a02020; border-color: #e6c0c0; background: #fdf3f3; }
.paste-btn-danger:hover { background: #fae6e6; color: #781616; border-color: #d99494; }

/* Code block + line-number gutter */
.paste-code {
    margin: 0;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    background: #fbfbfb;
    overflow: auto;
    font: 13px/1.5 "Droid Sans Mono", Consolas, Menlo, Monaco, monospace;
    tab-size: 4;
    -moz-tab-size: 4;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.paste-code.has-gutter { display: flex; }
.paste-code .paste-gutter {
    flex: 0 0 auto;
    text-align: right;
    padding: 12px 10px 12px 14px;
    margin: 0;
    color: #98a0aa;
    background: #f1f3f6;
    border-right: 1px solid #e0e4e9;
    white-space: pre;
    user-select: none;
    -webkit-user-select: none;
    font-variant-numeric: tabular-nums;
}
.paste-code code {
    display: block;
    flex: 1 1 auto;
    padding: 12px 14px;
    margin: 0;
    white-space: pre;
    overflow-x: auto;
    background: transparent;
    color: #1d2027;
}

/* "My Pastes" table tweaks — keep light without fighting the admin styles. */
.paste-page-wrap { max-width: 1000px; margin: 0 auto; }
