/**
 * DOSD Front-End Stylesheet
 * File:    dosd.css
 * Version: 1.00
 * Session: 36 (intersession)
 *
 * Same root cause as dosd.js: enqueued by dosd_enqueue() in
 * dosd-signup.php but never existed on the server. The inline <style>
 * block printed inside dosd_signup_shortcode() already forces text
 * colors with !important, so this file focuses on layout, spacing,
 * and the classes that have no inline fallback at all (buttons, step
 * indicators, tree view, badges, messages).
 *
 * DEPLOY: assets/dosd.css inside the plugin folder —
 *   wp-content/plugins/dosd-signup/assets/dosd.css
 */

/* ── Shared wrap / layout ─────────────────────────────────────────── */
.dosd-wrap { line-height: 1.5; }
.dosd-wrap * { box-sizing: border-box; }

/* ── Notice card header (signup form) ─────────────────────────────── */
.dosd-notice-card {
    position: relative;
    border-radius: 8px;
    padding: 28px 26px 24px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.dosd-notice-card h2 { margin: 10px 0 6px; font-size: 22px; }
.dosd-notice-card .dosd-subtitle { margin: 0; font-size: 14px; opacity: .92; }

.dosd-flag-badge {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 4px;
}
.dosd-flag-badge--large { width: 64px; height: 64px; font-size: 30px; }
.dosd-flag-badge--sm { width: 30px; height: 30px; font-size: 15px; }
.dosd-flag-inner { line-height: 1; }

/* ── Steps ─────────────────────────────────────────────────────────── */
.dosd-step { animation: dosd-fade-in .25s ease; }
.dosd-step-note { font-size: 12px; color: #7a7a8a; margin-top: 10px; }
@keyframes dosd-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ── Buttons ───────────────────────────────────────────────────────── */
.dosd-btn { transition: filter .15s ease, transform .05s ease; }
.dosd-btn:hover:not(:disabled) { filter: brightness(1.08); }
.dosd-btn:active:not(:disabled) { transform: translateY(1px); }
.dosd-btn:disabled { opacity: .65; cursor: not-allowed; }

.dosd-lookup-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #1F4E79;
    background: #fff;
    color: #1F4E79;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}
.dosd-lookup-btn:hover { background: #eef3f8; }

/* ── Consent / checkbox row ───────────────────────────────────────── */
.dosd-consent { margin-top: 10px; }
.dosd-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px !important;
    line-height: 1.6;
}
.dosd-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin-top: 3px !important;
    flex-shrink: 0;
}
.req { color: #c00; }
.dosd-optional { font-weight: 400; color: #8a8a9a; font-size: 11px; text-transform: none; letter-spacing: 0; }

/* ── Cross-domain node lookup row ─────────────────────────────────── */
.dosd-node-lookup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dosd-node-lookup-row input { flex: 1; min-width: 220px; }
.dosd-lookup-result {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    background: #f5f7fb;
    font-size: 13px;
}

/* ── Info / status boxes ───────────────────────────────────────────── */
.dosd-info-box {
    background: #f0f6fb;
    border-left: 4px solid #1F4E79;
    border-radius: 0 4px 4px 0;
    padding: 14px 16px;
    font-size: 13px;
}
.dosd-info-box p { margin: 0 0 8px; }
.dosd-info-box p:last-child { margin-bottom: 0; }
.dosd-node-display { font-size: 13px; margin: 6px 0 0; }
.dosd-node-display code {
    background: #eef2f7; padding: 2px 8px; border-radius: 3px;
    font-size: 12.5px; word-break: break-all;
}

.dosd-msg {
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    background: #f5f5f5;
    border-left: 4px solid currentColor;
}

.dosd-notice-ok  { color: #1a6b2e; background: #eaf7ee; border-left: 4px solid #2e7d32; padding: 10px 14px; border-radius: 0 4px 4px 0; }
.dosd-notice-err { color: #a30000; background: #fdecec; border-left: 4px solid #c00;    padding: 10px 14px; border-radius: 0 4px 4px 0; }

/* ── Success panel ─────────────────────────────────────────────────── */
.dosd-success { text-align: center; padding: 10px 6px 4px; }
.dosd-success h3 { margin: 8px 0 4px; }

/* ── Spinner ───────────────────────────────────────────────────────── */
.dosd-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(0,0,0,.15);
    border-top-color: #1F4E79;
    border-radius: 50%;
    animation: dosd-spin .7s linear infinite;
    vertical-align: -2px;
}
@keyframes dosd-spin { to { transform: rotate(360deg); } }

/* ── [dosd_tree] / [dosd_count] shortcodes ────────────────────────── */
.dosd-tree-wrap { font-family: sans-serif; font-size: 13px; }
.dosd-tree-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dosd-tree-count { font-weight: 700; font-size: 18px; color: #1F4E79; }
.dosd-tree-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8a8a9a; }
.dosd-tree-list { list-style: none; margin: 0; padding: 0; }
.dosd-tree-node {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.dosd-tree-node:last-child { border-bottom: none; }
.node-name { font-weight: 600; }
.node-hash { font-family: monospace; font-size: 11px; color: #8a8a9a; }
.node-date { font-size: 11px; color: #8a8a9a; margin-left: auto; }
.node-chain { font-size: 11px; color: #5a7a5a; }
.dosd-tree-genesis code { word-break: break-all; }
.dosd-tree-note { font-size: 11px; color: #8a8a9a; margin-top: 8px; }
.dosd-inline-count { font-weight: 700; color: #1F4E79; }

/* ── Document / conflict panels (admin-facing but shared handle) ─── */
.dosd-panel { border: 1px solid #dde3ea; border-radius: 6px; padding: 16px; margin-bottom: 14px; background: #fff; }
.dosd-section-head { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #1F4E79; margin-bottom: 10px; }
.dosd-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.dosd-doc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dosd-doc-table th, .dosd-doc-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; }
.dosd-hash, .dosd-sha-row { font-family: monospace; font-size: 11.5px; word-break: break-all; color: #5a5a6a; }
.dosd-parent-preview { background: #f5f7fb; border-radius: 4px; padding: 8px 12px; font-size: 12.5px; }

.dosd-tabs { display: flex; gap: 4px; border-bottom: 1px solid #dde3ea; margin-bottom: 14px; flex-wrap: wrap; }
.dosd-tab {
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #5a5a6a;
}
.dosd-tab.active, .dosd-tab:hover { color: #1F4E79; border-bottom-color: #1F4E79; }

/* ── Fallback footer ───────────────────────────────────────────────── */
.dosd-fallback-footer a { color: #1F4E79; }

/* ── Small screens ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .dosd-node-lookup-row { flex-direction: column; }
    .dosd-node-lookup-row input { min-width: 0; width: 100%; }
    .dosd-lookup-btn { width: 100%; }
    .dosd-tree-node { flex-direction: column; align-items: flex-start; }
    .node-date { margin-left: 0; }
}
