/* Plain CSS for the BB10 browser: flexbox works; grid and CSS variables do not. */
* { box-sizing: border-box; }
html, body { margin: 0; background: #0d0d0c; color: #e8e4da; }
body { font: 17px/1.4 "Slate Pro", "Helvetica Neue", Arial, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: #e8e4da; text-decoration: none; }
.bar { display: flex; align-items: center; height: 40px; padding: 0 10px; border-bottom: 1px solid #2a2925; background: #0d0d0c; }
.back { font-size: 28px; line-height: 40px; padding-right: 12px; color: #d9a441; }
.title { flex: 1; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-size: 13px; color: #8a867c; }
.page { padding: 8px 10px 16px; }
.row { display: flex; align-items: baseline; padding: 11px 2px; border-bottom: 1px solid #22211e; }
.row .first { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row.big { font-size: 20px; padding: 10px 2px; }
.when { margin-left: auto; padding-left: 8px; font-size: 13px; color: #8a867c; white-space: nowrap; }
.key { display: inline-block; min-width: 22px; margin-right: 12px; color: #d9a441; font-family: monospace; }
.dim { color: #8a867c; font-size: 14px; }
.error { color: #e0745a; }
input, textarea, select, button { font: inherit; color: #e8e4da; background: #1a1916; border: 1px solid #3a3833; border-radius: 4px; padding: 8px; }
textarea { width: 100%; resize: none; }
button { background: #d9a441; color: #0d0d0c; border: 0; font-weight: bold; padding: 8px 14px; }
button.no { background: #3a3833; color: #e8e4da; }
button.link { background: none; color: #8a867c; font-weight: normal; padding: 0; }
.stack input, .stack textarea, .stack select, .stack button { display: block; width: 100%; margin: 6px 0; }
.stack label { display: block; padding: 6px 0; }
.stack label input { display: inline; width: auto; margin: 0 8px 0 0; }
.inline { margin: 4px 0 8px; }
.foot { margin-top: 24px; text-align: center; }
.new { margin-top: 14px; }
.new summary { color: #d9a441; padding: 8px 0; }
.folders a { display: inline-block; margin: 0 6px 6px 0; padding: 3px 9px; border: 1px solid #3a3833; border-radius: 12px; font-size: 14px; }
.actions { display: flex; align-items: center; margin-top: 6px; }
.actions .photo, .actions .folder { flex: 1; margin-right: 8px; font-size: 13px; min-width: 0; }
.writing { min-height: 250px; border: 0; background: none; padding: 4px 0; font-size: 18px; line-height: 1.5; }

/* Chats and Claude Code */
.msg, .ev { margin: 8px 0; max-width: 88%; }
.msg .text, .ev .text { white-space: pre-wrap; word-wrap: break-word; }
.msg.me { margin-left: auto; background: #2a2618; border-radius: 10px 10px 2px 10px; padding: 7px 10px; }
.msg.them { padding: 2px 0; }
.msg .who { font-size: 13px; color: #d9a441; }
.msg.pending .text { color: #8a867c; }
.msg.error .text, .ev.error .text { color: #e0745a; }
.msg img { display: block; max-width: 100%; border-radius: 6px; margin-bottom: 4px; }
.compose { margin-top: 12px; border-top: 1px solid #2a2925; padding-top: 8px; }
.ev { max-width: 100%; }
.ev.you { margin-left: auto; max-width: 88%; background: #2a2618; border-radius: 10px 10px 2px 10px; padding: 7px 10px; }
.ev.tool .text, .ev.answer .text, .ev.done .text { font: 13px/1.35 monospace; color: #8a867c; }
.ev.ask { border-left: 3px solid #d9a441; padding: 4px 8px; }
.ev.ask .text { font: 14px/1.35 monospace; }
.ask { margin-top: 6px; }

/* BBM touches */
.av { width: 40px; height: 40px; vertical-align: middle; }
.av.small { width: 24px; height: 24px; }
.contact { display: flex; align-items: center; padding: 8px 2px; border-bottom: 1px solid #22211e; }
.contact .faces { min-width: 56px; }
.contact .faces .av.small { margin-right: -8px; }
.who-line { flex: 1; min-width: 0; padding-left: 8px; }
.who-line .name { display: block; font-weight: bold; }
.who-line .sub, .profile .sub { display: block; font-size: 13px; color: #8a867c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { background: #d64545; color: #fff; border-radius: 10px; min-width: 20px; padding: 1px 6px; font-size: 13px; text-align: center; font-weight: bold; }
.typing { color: #6cc070; font-style: italic; -webkit-animation: pulse 1.2s infinite; animation: pulse 1.2s infinite; }
@-webkit-keyframes pulse { 50% { opacity: .4; } }
@keyframes pulse { 50% { opacity: .4; } }
.profile { display: flex; align-items: center; padding: 4px 0 8px; border-bottom: 1px solid #22211e; }
.profile .av { margin-right: 6px; }
.profile .name { font-weight: bold; }
.pin-line { font: 13px monospace; color: #8a867c; text-align: center; margin-top: 16px; }
.msg.them { position: relative; padding-left: 30px; }
.msg.them .av.small { position: absolute; left: 0; top: 2px; }
.msg .shot, .shot { display: block; max-width: 100%; border-radius: 6px; margin-bottom: 4px; }
.receipt { font-size: 11px; color: #8a867c; text-align: right; margin-top: 2px; }
.receipt .d { color: #8a867c; font-weight: bold; }
.receipt .r { color: #6cc070; font-weight: bold; }
.msg.pinged .text { color: #e0453a; font-weight: bold; letter-spacing: 1px; }
button.ping { background: #3a1d1b; color: #ff6b5e; margin-right: 6px; padding: 8px 10px; }
.hidden { display: none; }
.inline-form { display: inline; }
.button { display: inline-block; background: #d9a441; color: #0d0d0c; font-weight: bold; padding: 8px 14px; border-radius: 4px; }

/* Pager */
.pager .bar { border-bottom: 0; }
#pager { text-align: center; }
#pager .clock { font: bold 64px/1 "Helvetica Neue", Arial, sans-serif; letter-spacing: 2px; margin-top: 4px; }
#pager .date { color: #8a867c; margin-bottom: 12px; }
.crew { display: flex; justify-content: space-around; margin-bottom: 10px; }
.mate { position: relative; display: block; width: 25%; font-size: 12px; color: #8a867c; }
.mate .av { width: 52px; height: 52px; }
.mate .dot { position: absolute; top: 2px; right: 18%; width: 10px; height: 10px; border-radius: 5px; background: #6cc070; border: 2px solid #0d0d0c; }
.mate.busy .dot { background: #d9a441; -webkit-animation: pulse 1s infinite; animation: pulse 1s infinite; }
.mate-name { display: block; }
.unread { display: block; color: #ff6b5e; font-weight: bold; margin-bottom: 6px; }
#latest .line { display: flex; align-items: center; text-align: left; font-size: 14px; padding: 4px 0; border-top: 1px solid #22211e; }
#latest .line span { padding-left: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.needs-title { margin-top: 10px; color: #d9a441; font-weight: bold; text-align: left; }
.need { text-align: left; font-size: 14px; padding: 3px 0; }

/* Photo journal */
.journal-add { margin-bottom: 12px; }
.entry { padding: 10px 0; border-bottom: 1px solid #22211e; }
.entry .day { color: #d9a441; font-size: 13px; margin-bottom: 4px; }
.entry .text { white-space: pre-wrap; margin: 4px 0; }
