/* ============================================================
   ub-theme.css  —  Ultimate Bible look for the community pages
   (Wall, Messages, Profile, support widget, moderation)

   Colours are taken from the Ultimate Bible "Today" page, which
   takes them from the logo:
     sky   (blue "ULTIMATE" letters)  -> main accent
     sun   (gold sun behind the book) -> second accent
     parch (cream Bible pages)        -> light-theme background
     ink   (black outline / night sky)-> dark-theme background

   HOW TO USE: add this ONE line to the <head> of each page,
   AFTER the page's own stylesheets/<style> blocks:
       <link rel="stylesheet" href="/community/ub-theme.css">
   Dark is the default. Light turns on with body.light-theme,
   exactly like the Ultimate Bible page.

   TO UNDO: remove that one line. Nothing else was changed.
   ============================================================ */

/* ---------- DARK (default) ---------- */
:root {
    /* master palette */
    --ub-bg:#0b1520;  --ub-card:#122130;  --ub-card2:#172a3c;
    --ub-line:#22384c; --ub-line2:#2e4b64;
    --ub-tx:#f4f1e6;  --ub-mut:#a3b5c5;
    --ub-accent:#38b6f5; --ub-accent-soft:#8fd6fb;
    --ub-btn:#2aaef2; --ub-on-btn:#04202f;
    --ub-gold:#ffc940; --ub-ok:#4fd1a5; --ub-danger:#f85149;
    --ub-track:#203548;
    --ub-tint:rgba(56,182,245,.14); --ub-tint2:rgba(255,201,64,.14);
    --ub-head:'Roboto Slab',Rockwell,Georgia,serif;

    /* Wall / Profile / moderation names */
    --primary-accent:var(--ub-gold);
    --secondary-accent:var(--ub-accent);
    --tertiary-accent:var(--ub-ok);
    --bg-primary:var(--ub-bg);
    --bg-secondary:var(--ub-card);
    --bg-tertiary:var(--ub-card2);
    --border-color:var(--ub-line);
    --border-light:var(--ub-line2);
    --text-primary:var(--ub-tx);
    --text-secondary:var(--ub-mut);
    --text-tertiary:#7f93a5;
    --success:var(--ub-ok);
    --warning:var(--ub-gold);
    --error:var(--ub-danger);
    --primary-gold:var(--ub-gold);
    --light-gold:#ffe08a;
    --warm-cream:var(--ub-accent-soft);
    --card-dark:var(--ub-card);
    --card-brown:var(--ub-card2);
    --border-brown:var(--ub-line);
    --purple:var(--ub-accent);
    --light-purple:var(--ub-accent-soft);

    /* Messages page names */
    --bg:var(--ub-bg);
    --surface:var(--ub-card);
    --surface2:var(--ub-card2);
    --border:var(--ub-line);
    --gold:var(--ub-gold);
    --gold-dim:#ffe08a;
    --accent:var(--ub-accent);
    --text:var(--ub-tx);
    --green:var(--ub-ok);
    --danger:var(--ub-danger);
}

/* ---------- LIGHT ---------- */
body.light-theme {
    --ub-bg:#faf6ea;  --ub-card:#ffffff;  --ub-card2:#f6f0de;
    --ub-line:#e8dfc4; --ub-line2:#d9cb98;
    --ub-tx:#14212b;  --ub-mut:#4c5a66;
    --ub-accent:#0a72b2; --ub-accent-soft:#085e92;
    --ub-btn:#0a72b2; --ub-on-btn:#ffffff;
    --ub-gold:#8f5f00; --ub-ok:#13806a; --ub-danger:#c9302c;
    --ub-track:#ece3c8;
    --ub-tint:rgba(10,114,178,.10); --ub-tint2:rgba(240,168,24,.16);

    --text-tertiary:#6b7782;
    --light-gold:#b07a10;
    --gold-dim:#8f5f00;
}

/* ---------- page background glow (same as Ultimate Bible) ---------- */
body {
    background-color:var(--ub-bg);
    background-image:
        radial-gradient(ellipse 70% 38% at 50% 0%, rgba(255,201,64,.10) 0%, transparent 70%),
        radial-gradient(circle at 90% 85%, rgba(56,182,245,.07) 0%, transparent 45%);
    background-attachment:fixed;
    color:var(--ub-tx);
}
body.light-theme {
    background-image:
        radial-gradient(ellipse 70% 38% at 50% 0%, rgba(240,168,24,.14) 0%, transparent 70%),
        radial-gradient(circle at 90% 85%, rgba(10,114,178,.05) 0%, transparent 45%);
}

/* ---------- shared pieces: cards, headings, buttons ---------- */
h1, h2, h3, .nav-title, .sidebar-title, .box-title { font-family:var(--ub-head); }

body.light-theme .post-card,
body.light-theme .sidebar-box,
body.light-theme .profile-card {
    box-shadow:0 1px 2px rgba(80,60,10,.05), 0 4px 14px rgba(80,60,10,.04);
}

/* primary buttons: sky blue (white text in light, deep ink in dark) */
.btn-primary, .post-btn, .submit-btn, button.primary {
    background:var(--ub-btn); color:var(--ub-on-btn); border-color:var(--ub-btn);
}
.btn-primary:hover, .post-btn:hover, .submit-btn:hover { filter:brightness(1.08); }
body.light-theme .btn-primary, body.light-theme .post-btn, body.light-theme .submit-btn { color:#fff !important; }

/* inputs */
input[type=text], input[type=search], input[type=email], textarea, select {
    background:var(--ub-card2); color:var(--ub-tx); border-color:var(--ub-line2);
}
input::placeholder, textarea::placeholder { color:var(--ub-mut); opacity:.85; }
input:focus, textarea:focus, select:focus { outline:2px solid var(--ub-accent); outline-offset:1px; }

/* ---------- community navigation bar ----------
   community-nav.js paints itself with these (dark navy in BOTH themes). */
:root, body.light-theme {
    --ub-nav-bg:#0b1520; --ub-nav-line:#22384c; --ub-nav-tx:#a3b5c5;
    --ub-nav-accent:#38b6f5; --ub-nav-tint:rgba(56,182,245,.16);
}

/* ---------- Messages page (had hard-coded tan/purple in light mode) ---------- */
body.light-theme .msg-sidebar { background:var(--ub-card2) !important; border-right-color:var(--ub-line2) !important; }
body.light-theme .msg-sidebar-header { border-bottom-color:var(--ub-line2) !important; }
body.light-theme .msg-main { background:var(--ub-bg) !important; }

/* ---------- Profile page extras ---------- */
body.light-theme .post-image-btn { color:var(--ub-tx); border-color:var(--ub-line2); }
body.light-theme .post-image-btn:hover { color:var(--ub-accent); border-color:var(--ub-accent); }
body.light-theme .wall-share-check { color:var(--ub-tx); }

/* ---------- Wall tabs ---------- */
.feed-tab, .wall-tab { background:var(--ub-card2); color:var(--ub-mut); border:1px solid var(--ub-line); }
.feed-tab.active, .wall-tab.active { background:var(--ub-btn); border-color:var(--ub-btn); color:var(--ub-on-btn); }
body.light-theme .feed-tab.active, body.light-theme .wall-tab.active { color:#fff !important; }

/* ---------- Support widget & live chat ---------- */
.support-panel, .support-box { background:var(--ub-card); border-color:var(--ub-line2); color:var(--ub-tx); }
.lc-offer { background:var(--ub-card); border-color:var(--ub-line2); color:var(--ub-tx); }

/* ---------- Moderation dialog / queue ---------- */
.mod-dialog, .mod-queue-item { background:var(--ub-card); border-color:var(--ub-line2); color:var(--ub-tx); }
