/* Common Era Events Portal - the components this portal adds.

   portal.css (copied unchanged from the Dev Portal) owns the chrome: tokens,
   sidebar, filter bar, panels, buttons, inputs, tables. This file only adds
   what the Events Portal introduces, written against the same tokens, and does
   not restyle anything portal.css owns - with one exception, the phone layout
   at the bottom, which portal.css has none of. People check in at the table on
   their phones, so this portal cannot skip it.

   Colour keeps the Dev Portal's discipline: the accent for selection and
   primary actions, --attn for something waiting (happening now, going), green
   for done, red for removed or cancelled, and everything else neutral. */

/* ============================ sidebar additions ============================ */
.ev-navgroup{font-size:9.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-3);
  padding:14px 14px 4px;}
.ev-organizer{display:flex;flex-direction:column;gap:2px;}
.ev-demo{display:flex;flex-direction:column;gap:6px;padding:10px;border:1px dashed var(--attn);border-radius:var(--r-sm);
  background:var(--attn-soft);}
.ev-demo-lbl{font-size:9.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--attn);}
.ev-linkbtn{border:none;background:none;padding:0;font:inherit;font-size:12px;color:var(--text-2);cursor:pointer;
  text-align:left;text-decoration:underline;text-underline-offset:2px;}
.ev-linkbtn:hover{color:var(--text);}
#login-gate .ev-linkbtn{margin-top:10px;}
.login-note a{color:var(--text-2);}
.login-msg.ok{color:var(--success);}

/* the phone bar and the scrim behind the open menu (desktop: never shown) */
.ev-topbar,.ev-scrim{display:none;}

/* ============================ shared bits ============================ */
.ev-h1{margin-bottom:14px;}
.ev-small{font-size:12px;color:var(--text-3);line-height:1.5;}
.panel p.ev-small{font-size:12px;color:var(--text-3);}
.ev-dot{color:var(--text-3);margin:0 2px;}
.ev-empty{font-size:13px;font-style:italic;color:var(--text-3);padding:26px 4px;}
.ev-narrow{max-width:560px;}
.ev-wide{max-width:760px;}
.ev-page{padding:22px 30px;}
/* pages that open on a filter bar: the bar is the top of the page, as in the Dev Portal */
#view-sessions,#view-photos{padding:0;}

.ev-chip{display:inline-block;font-size:10.5px;font-weight:600;letter-spacing:.02em;border-radius:99px;padding:1px 8px;
  border:1px solid var(--border-strong);color:var(--text-2);background:var(--surface-2);vertical-align:2px;white-space:nowrap;}
.ev-chip.live,.ev-chip.going{color:var(--attn);background:var(--attn-soft);border-color:var(--attn);}
.ev-chip.done{color:var(--success);border-color:var(--success);}
.ev-chip.bad{color:var(--danger);background:var(--danger-soft);border-color:var(--danger);}
.ev-chip.quiet{color:var(--text-3);}

.ev-btnrow{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.ev-btnrow .dt-btn,.ev-addrow .dt-btn,.ev-crumb-acts .dt-btn{margin-left:0;}
.dt-btn.ev-danger{color:var(--danger);}
.dt-btn.ev-danger:hover{background:var(--danger-soft);border-color:var(--danger);}
.dt-btn:disabled{opacity:.55;cursor:default;}
a.dt-btn{display:inline-block;text-decoration:none;}

.ev-panel{margin-bottom:14px;}
.ev-panel.ev-good{border-color:var(--success);}
.ev-panel.ev-warn{border-color:var(--danger);}
.ev-panel.ev-good h3{color:var(--success);}
.ev-panel.ev-warn h3{color:var(--danger);}

/* a whole number of pips toward the unlock */
.ev-meter{display:flex;gap:5px;margin:10px 0;}
.ev-pip{flex:1;max-width:46px;height:8px;border-radius:4px;background:var(--surface-3);border:1px solid var(--border);}
.ev-pip.on{background:var(--success);border-color:var(--success);}

.ev-flash{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);z-index:900000;max-width:calc(100% - 32px);
  background:var(--text);color:var(--surface);font-size:13px;font-weight:500;padding:10px 16px;border-radius:var(--r);
  box-shadow:var(--shadow-pop);}
.ev-flash.bad{background:var(--danger);color:#fff;}

/* ============================ sessions: calendar + list ============================ */
.ev-fbwrap{align-items:flex-end;}
.ev-fb-action{margin-left:auto;align-self:flex-end;}
.ev-fb-action .dt-btn{margin-left:0;}
.ev-sessions{display:flex;gap:26px;align-items:flex-start;padding:22px 30px;}
.ev-cal-wrap{flex:0 0 336px;position:sticky;top:18px;}
.ev-list{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px;}

.ev-cal{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px;}
.ev-cal-head{display:flex;align-items:center;justify-content:space-between;font-size:13.5px;font-weight:600;margin-bottom:8px;}
.ev-cal-head button{border:1px solid var(--border);background:var(--surface);color:var(--text-2);border-radius:var(--r-sm);
  width:28px;height:26px;cursor:pointer;font-size:16px;line-height:1;}
.ev-cal-head button:hover{background:var(--surface-2);color:var(--text);}
.ev-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;}
.ev-cal-dow{font-size:9.5px;font-weight:700;letter-spacing:.08em;color:var(--text-3);text-align:center;padding:3px 0;}
.ev-cal-cell{min-height:44px;border-radius:var(--r-sm);padding:3px;display:flex;flex-direction:column;gap:2px;min-width:0;}
.ev-cal-cell.blank{visibility:hidden;}
.ev-cal-cell.has{background:var(--surface-2);}
.ev-cal-num{font-size:11px;color:var(--text-3);line-height:1.2;padding-left:2px;}
.ev-cal-cell.today .ev-cal-num{color:var(--accent-on);background:var(--accent);border-radius:99px;align-self:flex-start;padding:0 5px;font-weight:600;}
.ev-cal-ev{display:block;font-size:9.5px;line-height:1.3;padding:1px 3px;border-radius:3px;text-decoration:none;
  color:var(--text);background:var(--surface);border:1px solid var(--border-strong);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ev-cal-ev:hover{border-color:var(--text-3);}
.ev-cal-ev.live{border-color:var(--attn);color:var(--attn);}
.ev-cal-ev.past{color:var(--text-3);}
.ev-cal-ev.cancelled{color:var(--text-3);text-decoration:line-through;}
.ev-cal-ev.mine{box-shadow:inset 2px 0 0 var(--success);}

.ev-row{display:flex;align-items:center;gap:16px;padding:12px 16px;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r);text-decoration:none;color:inherit;transition:border-color .12s,box-shadow .12s;}
.ev-row:hover{border-color:var(--text-3);box-shadow:var(--shadow-card);}
.ev-row.cancelled{opacity:.62;}
.ev-row-main{flex:1;min-width:0;}
.ev-row-title{font-size:15px;font-weight:600;color:var(--text);line-height:1.35;}
.ev-row-meta{font-size:12.5px;color:var(--text-2);margin-top:3px;}
.ev-row-num{font-size:12px;color:var(--text-3);text-align:right;flex-shrink:0;line-height:1.45;}
.ev-row-num b{font-size:15px;color:var(--text);font-weight:600;}

.ev-date{flex:0 0 52px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  border:1px solid var(--border-strong);border-radius:var(--r);background:var(--surface-2);padding:5px 0 6px;line-height:1.1;}
.ev-date-dow,.ev-date-mon{font-size:9.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text-3);}
.ev-date-day{font-size:21px;font-weight:600;color:var(--text);margin:1px 0;}

/* ============================ one session ============================ */
.ev-crumbs{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px;min-height:30px;}
.ev-crumb-acts{display:flex;gap:8px;flex-wrap:wrap;}
.ev-head{display:flex;gap:16px;align-items:center;margin-bottom:20px;}
.ev-head .page-h1{margin:0;}
.ev-head-meta{font-size:13px;color:var(--text-2);margin-top:4px;}
.ev-cols{display:flex;gap:22px;align-items:flex-start;flex-wrap:wrap;}
.ev-main{flex:1 1 380px;min-width:0;}
.ev-side{flex:0 1 400px;min-width:0;width:400px;max-width:100%;}

.ev-venue-name{font-size:15px;font-weight:600;color:var(--text);}
.ev-addr{font-size:13.5px;color:var(--text-2);margin-top:3px;}
.ev-note{font-size:12.5px;color:var(--text-2);margin-top:8px;padding:8px 10px;background:var(--surface-2);border-radius:var(--r-sm);}
.ev-desc{white-space:pre-wrap;}
.ev-map{height:280px;margin-top:14px;border:1px solid var(--border);border-radius:var(--r-sm);background:var(--surface-2);overflow:hidden;}
.ev-map-off{height:auto;padding:22px 14px;font-size:12px;color:var(--text-3);text-align:center;font-style:italic;}

.ev-rsvp{margin:4px 0 10px;}
.act-tabs.ev-rsvp,.act-tabs.ev-seg{width:auto;display:flex;}
.ev-rsvp .act-tab,.ev-seg .act-tab{flex:1;padding:8px 12px;font-size:13px;}
.act-tab:disabled{cursor:default;opacity:.7;}
.ev-seg{margin-bottom:12px;}

.ev-checkin{display:flex;gap:8px;align-items:stretch;}
.ev-checkin .dt-btn{margin-left:0;padding:0 16px;font-size:13.5px;}
.ev-code-in{flex:1;min-width:0;background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--r-sm);color:var(--text);
  font-family:var(--font-ui);font-size:20px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;padding:9px 12px;outline:none;}
.ev-code-in:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);}
.ev-code-in::placeholder{color:var(--text-3);font-weight:400;letter-spacing:.1em;}

.ev-form .ef-label{margin-top:4px;}
.ev-form .ef-input,.ev-form .ef-area{margin-bottom:10px;}
.ev-form .ev-submit{margin-left:0;margin-top:4px;padding:8px 16px;}
.ev-check{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;color:var(--text-2);line-height:1.45;margin:4px 0 12px;cursor:pointer;}
.ev-check input{margin-top:2px;flex-shrink:0;}
.ev-upload input[type=file]{font:inherit;font-size:12.5px;color:var(--text-2);margin-bottom:10px;max-width:100%;}
.ev-cell-btn{display:flex;align-items:flex-start;padding-top:19px;}
.ev-cell-btn .dt-btn{margin-left:0;white-space:nowrap;}

.ev-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px;margin:8px 0 14px;}
.ev-thumb{border:1px solid var(--border);border-radius:var(--r-sm);overflow:hidden;background:var(--surface-2);}
.ev-thumb img{display:block;width:100%;aspect-ratio:1;object-fit:cover;cursor:zoom-in;background:var(--surface-3);}
.ev-thumb-foot{display:flex;align-items:center;justify-content:space-between;padding:4px 5px;}
.ev-x{border:none;background:none;color:var(--text-3);font-size:17px;line-height:1;cursor:pointer;padding:0 3px;border-radius:3px;}
.ev-x:hover{color:var(--danger);background:var(--danger-soft);}

/* organizer panels */
.ev-code-big{font-size:34px;font-weight:700;letter-spacing:.12em;color:var(--text);margin:2px 0 6px;}
.ev-tally{font-size:13px;color:var(--text-2);margin-bottom:8px;}
.ev-tally b{font-size:16px;color:var(--text);}
.ev-people{list-style:none;margin:0 0 8px;padding:0;}
.ev-people li{font-size:13px;color:var(--text);padding:6px 0;border-top:1px solid var(--border);}
.ev-people li:first-child{border-top:none;}
.ev-people.quiet li{color:var(--text-3);}
.ev-attend li{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.ev-attend li>div{display:flex;flex-direction:column;min-width:0;}
.ev-attend li.removed span:first-child{color:var(--text-3);text-decoration:line-through;}
.ev-attend .dt-btn{margin-left:0;padding:4px 10px;font-size:12px;flex-shrink:0;}
.ev-sublbl{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);margin:10px 0 2px;}
.ev-addrow{display:flex;gap:8px;margin-top:10px;}
.ev-addrow .ef-input{flex:1;min-width:0;}

.ev-fb{padding:10px 0;border-top:1px solid var(--border);}
.ev-fb:first-of-type{border-top:none;}
.ev-fb-head{font-size:13px;color:var(--text);}
.ev-fb-body{font-size:13px;color:var(--text-2);margin-top:4px;line-height:1.5;white-space:pre-wrap;}
.ev-fbg-head{margin-bottom:12px;font-size:14px;}
.ev-fbg-head a{color:var(--text);text-decoration:none;}
.ev-fbg-head a:hover{text-decoration:underline;}

/* ============================ the code at the table ============================ */
.ev-tablecode{position:fixed;inset:0;z-index:850000;background:var(--bg);color:var(--text);display:flex;flex-direction:column;
  align-items:center;justify-content:center;text-align:center;padding:24px;gap:12px;}
.ev-tc-title{font-size:clamp(20px,3.5vw,38px);font-weight:600;max-width:100%;}
.ev-tc-lbl{font-size:clamp(14px,2vw,22px);color:var(--text-2);}
.ev-tc-code{font-size:clamp(44px,13vw,220px);white-space:nowrap;font-weight:700;letter-spacing:.08em;line-height:1;margin:14px 0;
  font-variant-numeric:tabular-nums;}
.ev-tc-foot{font-size:clamp(13px,1.6vw,18px);color:var(--text-3);}
.ev-tc-close{position:absolute;top:14px;right:18px;border:1px solid var(--border-strong);background:var(--surface);color:var(--text-2);
  width:40px;height:40px;border-radius:var(--r);font-size:24px;line-height:1;cursor:pointer;}

.ev-lightbox{position:fixed;inset:0;z-index:840000;background:rgba(10,10,9,.88);display:flex;align-items:center;justify-content:center;
  padding:24px;cursor:zoom-out;}
.ev-lightbox img{max-width:100%;max-height:100%;object-fit:contain;border-radius:var(--r-sm);}
.ev-lb-close{position:absolute;top:14px;right:18px;border:none;background:none;color:#fff;font-size:30px;cursor:pointer;}

/* ============================ check in + progress ============================ */
.ev-result{margin-top:16px;padding-top:14px;border-top:1px solid var(--border);}
.ev-result-title{font-size:17px;font-weight:600;color:var(--success);}
.ev-inline-btn{padding:7px 14px;font-size:12.5px;margin-left:0;}
.ev-progress p{font-size:14px;color:var(--text);}
.ev-big-num{font-size:44px;font-weight:600;color:var(--text);line-height:1;}
.ev-big-num span{font-size:18px;color:var(--text-3);font-weight:500;}
.ev-plain{list-style:none;margin:0;padding:0;}
.ev-plain li{padding:7px 0;border-top:1px solid var(--border);font-size:13.5px;}
.ev-plain li:first-child{border-top:none;}
.ev-plain a{color:var(--text);font-weight:500;}
.ev-plain li.removed a{color:var(--text-3);text-decoration:line-through;}

/* ============================ organizer pages ============================ */
.ev-titlerow{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.ev-titlerow .dt-btn{margin-left:0;}
.ev-tablewrap{overflow-x:auto;padding:8px 14px;}
.ev-table td{vertical-align:middle;}
.ev-table .ev-meter{margin:0;width:120px;display:inline-flex;vertical-align:middle;}
.ev-att{display:inline-flex;align-items:center;gap:8px;}
.ev-decks .ef-input{margin:0;min-width:120px;}
.ev-decks .ev-num{width:70px;min-width:0;}
.ev-decks .ev-check{margin:0;}
.ev-decks .dt-btn{margin-left:0;}
.ev-venue-card.archived{opacity:.6;}

.ev-photo-wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;}
.ev-photo{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;}
.ev-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:var(--surface-3);cursor:zoom-in;}
.ev-photo-body{padding:10px 12px;display:flex;flex-direction:column;gap:3px;}
.ev-photo-cap{font-size:13px;color:var(--text);}
.ev-photo-acts{display:flex;gap:6px;align-items:center;margin-top:6px;}
.ev-photo-acts .ef-input{flex:1;}

/* ============================ phones ============================ */
@media (max-width:760px){
  body{flex-direction:column;}
  .ev-topbar{display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:700;height:52px;padding:0 14px;
    background:var(--sidebar);border-bottom:1px solid var(--border);}
  .ev-topbar-brand{font-size:16px;font-weight:700;color:var(--text);}
  .ev-topbar-brand span{font-size:12px;font-weight:500;color:var(--text-3);margin-left:3px;}
  .ev-menu{width:38px;height:38px;border:1px solid var(--border);border-radius:var(--r-sm);background:var(--surface);cursor:pointer;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0;}
  .ev-menu span{display:block;width:16px;height:1.5px;background:var(--text-2);border-radius:1px;}

  #sidebar{position:fixed;top:0;left:0;bottom:0;z-index:800;height:100%;width:260px;transform:translateX(-102%);
    transition:transform .2s ease;box-shadow:var(--shadow-pop);}
  body.ev-menu-open #sidebar{transform:none;}
  body.ev-menu-open .ev-scrim{display:block;position:fixed;inset:0;z-index:790;background:rgba(10,10,9,.35);}

  main{padding:18px 16px 24px;}
  #view-sessions,#view-photos{padding:0;}
  .fbar{padding:11px 16px 10px;}
  .ev-sessions{flex-direction:column;padding:16px;gap:16px;}
  .ev-cal-wrap{position:static;flex:none;width:100%;}
  .ev-page{padding:16px;}
  .ev-row{padding:10px 12px;gap:12px;}
  .ev-row-num{display:none;}
  .ev-side{width:100%;flex:1 1 100%;}
  .ev-head{align-items:flex-start;}
  .ef-3{flex-wrap:wrap;}
  .ef-3 .ef-cell{flex:1 1 140px;}
  .ev-cell-btn{padding-top:0;}
  .ev-flash{bottom:16px;}
}

/* links inside this portal's panels read as text, not browser blue */
.ev-panel a:not(.dt-btn){color:var(--text);text-underline-offset:2px;}

