/* Expo App Frontend UI (ready out-of-the-box)
   Goal: modern, clean, app-like UI for lightweight themes (Hello Elementor, etc.)
   Notes: uses CSS variables, respects reduced motion, and provides accessible focus states.
*/

:root{
  --ucx-bg: #ffffff;
  --ucx-surface: rgba(255,255,255,.92);
  --ucx-surface-2: #f8fafc;
  --ucx-border: rgba(15,23,42,.12);
  --ucx-text: #0f172a;
  --ucx-muted: rgba(15,23,42,.72);
  --ucx-muted-2: rgba(15,23,42,.58);
  --ucx-primary: #2563eb;
  --ucx-primary-2: #1d4ed8;
  --ucx-link: #2563eb;
  --ucx-radius: 16px;
  --ucx-radius-sm: 12px;
  --ucx-shadow: 0 14px 40px rgba(2, 6, 23, .10);
  --ucx-shadow-sm: 0 10px 28px rgba(2, 6, 23, .08);
  --ucx-ring: 0 0 0 3px rgba(37, 99, 235, .18);
  --ucx-ease: cubic-bezier(.2,.8,.2,1);
  --ucx-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --ucx-weight-body: 500;
  --ucx-weight-heading: 800;
}

/* Wrapper: keeps styles scoped. */
.uc-expo{
  font-family: var(--ucx-font);
  font-weight: var(--ucx-weight-body);
  color: var(--ucx-text);
}

.uc-expo *{ box-sizing: border-box; }

.uc-expo a{ color: var(--ucx-link); text-decoration: none; }
.uc-expo a:hover{ text-decoration: underline; }

.uc-expo .uc-expo-section{
  background: var(--ucx-surface);
  border: 1px solid var(--ucx-border);
  border-radius: var(--ucx-radius);
  box-shadow: var(--ucx-shadow-sm);
  padding: 18px;
}

.uc-expo .uc-expo-section + .uc-expo-section{ margin-top: 16px; }

.uc-expo .uc-expo-title{
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: var(--ucx-weight-heading);
}

.uc-expo .uc-expo-subtitle{
  margin: 0 0 12px;
  color: var(--ucx-muted);
}

.uc-expo .uc-expo-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.uc-expo .uc-expo-card{
  background: #fff;
  border: 1px solid var(--ucx-border);
  border-radius: var(--ucx-radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(2,6,23,.03);
  transition: transform 180ms var(--ucx-ease), box-shadow 180ms var(--ucx-ease), border-color 180ms var(--ucx-ease);
}

.uc-expo .uc-expo-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--ucx-shadow);
  border-color: rgba(37, 99, 235, .24);
}

.uc-expo .uc-expo-card:active{
  transform: translateY(0px) scale(0.995);
}

.uc-expo .uc-expo-card__media{
  width: 100%;
  height: 160px;
  background: var(--ucx-surface-2);
  display: block;
  object-fit: cover;
}

.uc-expo .uc-expo-card__body{ padding: 14px; }

.uc-expo .uc-expo-card__eyebrow{
  margin: 0 0 10px;
}

.uc-expo .uc-expo-card__h{
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: var(--ucx-weight-heading);
}

.uc-expo .uc-expo-card__meta{
  margin: 0 0 10px;
  color: var(--ucx-muted);
  font-size: 13px;
}

.uc-expo .uc-expo-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.uc-expo .uc-expo-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid var(--ucx-border);
  background: rgba(2,6,23,.03);
  color: rgba(15,23,42,.82);
}

.uc-expo .uc-expo-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.uc-expo .uc-expo-btn{
  appearance: none;
  border: 1px solid var(--ucx-border);
  background: #fff;
  color: var(--ucx-text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: var(--ucx-weight-heading);
  font-size: 13px;
  cursor: pointer;
  transition: background 160ms var(--ucx-ease), border-color 160ms var(--ucx-ease), transform 160ms var(--ucx-ease), box-shadow 160ms var(--ucx-ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.uc-expo .uc-expo-btn:hover{ background: rgba(2,6,23,.03); text-decoration: none; }

.uc-expo .uc-expo-btn:active{ transform: translateY(1px) scale(0.99); }

.uc-expo .uc-expo-btn--primary{
  background: var(--ucx-primary);
  border-color: rgba(37,99,235,.55);
  color: #fff;
}

.uc-expo .uc-expo-btn--primary:hover{ background: var(--ucx-primary-2); }

.uc-expo .uc-expo-btn:focus,
.uc-expo .uc-expo-btn:focus-visible,
.uc-expo a:focus,
.uc-expo a:focus-visible{
  outline: none;
  box-shadow: var(--ucx-ring);
  border-radius: 12px;
}

.uc-expo .uc-expo-tabs{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.uc-expo .uc-expo-tab{
  border: 1px solid var(--ucx-border);
  background: rgba(255,255,255,.9);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.uc-expo .uc-expo-tab[aria-selected="true"]{
  background: rgba(37,99,235,.10);
  border-color: rgba(37,99,235,.35);
  color: var(--ucx-primary-2);
}

.uc-expo .uc-expo-tabpanel[hidden]{ display: none; }

.uc-expo .uc-expo-divider{ border: none; border-top: 1px solid var(--ucx-border); margin: 14px 0; }

.uc-expo .uc-expo-kicker{ color: var(--ucx-muted-2); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; }

/* Forms */
.uc-expo .uc-expo-filters{ margin: 6px 0 0; }
.uc-expo .uc-expo-filters__row{ display:flex; flex-wrap:wrap; gap: 12px; align-items: flex-end; }
.uc-expo .uc-expo-field{ display:flex; flex-direction:column; gap:6px; min-width: 220px; flex: 1 1 220px; }
.uc-expo .uc-expo-field__label{ font-size: 12px; font-weight: 800; color: var(--ucx-muted-2); text-transform: uppercase; letter-spacing: .08em; }
.uc-expo .uc-expo-input,
.uc-expo .uc-expo-select{
  width: 100%;
  border: 1px solid var(--ucx-border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--ucx-text);
}
.uc-expo .uc-expo-input:focus,
.uc-expo .uc-expo-select:focus{ outline:none; box-shadow: var(--ucx-ring); }

/* Toast (global, used by REST toggle buttons) */
.ucx-toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(15,23,42,.92);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 14px 40px rgba(2,6,23,.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ucx-ease), transform 180ms var(--ucx-ease);
  z-index: 99999;
}
.ucx-toast.is-on{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* Lists */
.uc-expo .uc-expo-list{ list-style:none; padding:0; margin: 0; display:flex; flex-direction:column; gap: 10px; }
.uc-expo .uc-expo-list__item{ padding: 12px 12px; border: 1px solid var(--ucx-border); border-radius: 14px; background: rgba(255,255,255,.9); }
.uc-expo .uc-expo-list__link{ font-weight: 800; color: var(--ucx-text); text-decoration:none; }
.uc-expo .uc-expo-list__link:hover{ text-decoration: underline; }
.uc-expo .uc-expo-list__meta{ color: var(--ucx-muted); font-size: 12px; margin-left: 8px; }

/* Pills & alerts */
.uc-expo .uc-expo-pill{ display:inline-flex; align-items:center; padding: 5px 10px; border-radius:999px; font-size:12px; font-weight: 900; border: 1px solid var(--ucx-border); background: rgba(2,6,23,.04); margin-right: 10px; }
.uc-expo .uc-expo-alert{ border: 1px solid var(--ucx-border); border-radius: 14px; padding: 12px 12px; background: rgba(255,255,255,.92); box-shadow: var(--ucx-shadow-sm); }
.uc-expo .uc-expo-alert--urgent{ border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.uc-expo .uc-expo-alert--success{ border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10); }
.uc-expo .uc-expo-alert__link{ color: inherit; text-decoration: underline; font-weight: 900; }

/* Check-in badge shortcode */
.uc-expo-badge{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34,197,94,.35);
  background: rgba(34,197,94,.10);
  color: rgba(15,23,42,.95);
  font-weight: 800;
  box-shadow: var(--ucx-shadow-sm);
}
.uc-expo-badge > span{ font-size: 18px; line-height: 1; }

/* Leaderboard + My Checkins (match premium UI) */
.uc-lb,
.uc-my-checkins{
  font-family: var(--ucx-font);
  color: var(--ucx-text);
}

.uc-lb .uc-lb-header{ margin: 0 0 12px; }
.uc-lb .uc-lb-search{ display:flex; gap: 10px; align-items:center; flex-wrap: wrap; }
.uc-lb .uc-lb-search input{
  border: 1px solid var(--ucx-border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  min-width: 220px;
}
.uc-lb .uc-lb-search button{
  border: 1px solid var(--ucx-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  font-weight: 900;
  cursor:pointer;
}

.uc-lb .uc-lb-podium{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.uc-lb .uc-lb-card{
  border: 1px solid var(--ucx-border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--ucx-shadow-sm);
}
.uc-lb .uc-lb-medal{ font-size: 18px; margin: 0 0 6px; }
.uc-lb .uc-lb-name{ font-weight: 900; }
.uc-lb .uc-lb-points{ color: var(--ucx-muted); font-weight: 800; margin-top: 4px; }

.uc-lb .uc-lb-table,
.uc-my-checkins .uc-table{
  border: 1px solid var(--ucx-border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.92);
  box-shadow: var(--ucx-shadow-sm);
}
.uc-lb table,
.uc-my-checkins table{ width: 100%; border-collapse: collapse; }
.uc-lb th,
.uc-lb td,
.uc-my-checkins th,
.uc-my-checkins td{ padding: 12px 12px; border-bottom: 1px solid rgba(15,23,42,.08); text-align:left; }
.uc-lb th,
.uc-my-checkins th{ font-size: 12px; color: var(--ucx-muted); text-transform: uppercase; letter-spacing: .06em; }
.uc-lb tbody tr:hover,
.uc-my-checkins tbody tr:hover{ background: rgba(2,6,23,.02); }

.uc-my-checkins .uc-filters,
.uc-my-checkins .uc-optout{
  display:flex;
  gap: 12px;
  align-items:flex-end;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.uc-my-checkins label{ font-weight: 800; font-size: 13px; color: var(--ucx-muted); }
.uc-my-checkins select,
.uc-my-checkins input[type="date"]{
  display:block;
  margin-top: 6px;
  border: 1px solid var(--ucx-border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--ucx-text);
}
.uc-my-checkins button{
  border: 1px solid var(--ucx-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  font-weight: 900;
  cursor:pointer;
}

.uc-badge{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--ucx-border);
  background: rgba(2,6,23,.04);
  font-size: 12px;
  font-weight: 900;
  margin-right: 8px;
}

.uc-lb .uc-lb-pagination,
.uc-my-checkins .uc-pagination{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.uc-lb .uc-lb-pagination a,
.uc-my-checkins .uc-pagination a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--ucx-border);
  background: rgba(255,255,255,.92);
  font-weight: 900;
  color: var(--ucx-text);
  text-decoration:none;
}
.uc-lb .uc-lb-pagination a.current,
.uc-my-checkins .uc-pagination a.current{
  background: rgba(37,99,235,.10);
  border-color: rgba(37,99,235,.30);
}

/* Map */
.uc-expo .uc-expo-map{ border: 1px solid var(--ucx-border); border-radius: var(--ucx-radius); overflow:hidden; background:#fff; box-shadow: 0 1px 0 rgba(2,6,23,.03); }
.uc-expo .uc-expo-map__img{ display:block; width:100%; height:auto; }
.uc-expo .ucx-lb-trigger{ display:block; cursor: zoom-in; }

/* Lightbox */
html.ucx-lb-open{ overflow:hidden; }
.uc-expo .ucx-lb{ position: fixed; inset: 0; z-index: 99999; }
.uc-expo .ucx-lb[hidden]{ display:none; }
.uc-expo .ucx-lb__backdrop{ position:absolute; inset:0; background: rgba(2,6,23,.74); }
.uc-expo .ucx-lb__panel{ position: relative; margin: 0; height: 100%; display:flex; align-items:center; justify-content:center; padding: 18px; }
.uc-expo .ucx-lb__img{ max-width: min(1200px, 96vw); max-height: 92vh; width: auto; height: auto; border-radius: 14px; box-shadow: var(--ucx-shadow); background:#fff; }
.uc-expo .ucx-lb__close{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(15,23,42,.55);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.uc-expo .ucx-lb__close:focus{ outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.22); }

/* Offline pack */
.uc-expo .uc-expo-offline{ max-width: 820px; margin: 0 auto; display:flex; gap: 18px; align-items:flex-start; flex-wrap: wrap; }
.uc-expo .uc-expo-offline__anim{ width: 120px; height: 120px; position: relative; flex: 0 0 auto; }
.uc-expo .uc-expo-offline__ring{ position:absolute; inset:0; border-radius:50%; border:2px solid rgba(37,99,235,.25); }
.uc-expo .uc-expo-offline__dot{ position:absolute; left:50%; top:50%; width:12px; height:12px; border-radius:50%; transform:translate(-50%,-50%); background: linear-gradient(135deg, var(--ucx-primary), #0ea5e9); box-shadow: 0 12px 26px rgba(37,99,235,.22); }
.uc-expo .uc-expo-offline__pulse{ position:absolute; inset:-6px; border-radius:50%; border:2px solid rgba(37,99,235,.30); animation: ucxPulse 1.4s var(--ucx-ease) infinite; }
@keyframes ucxPulse{ 0%{ transform:scale(.72); opacity:.85 } 100%{ transform:scale(1.25); opacity:0 } }
.uc-expo .uc-expo-offline__main{ flex: 1 1 360px; min-width: 320px; }
.uc-expo .uc-expo-offline__steps{ margin: 0 0 12px; padding-left: 18px; color: var(--ucx-muted); }
.uc-expo .uc-expo-offline__bar{ height: 12px; border-radius: 999px; background: rgba(15,23,42,.08); overflow:hidden; border: 1px solid rgba(15,23,42,.08); }
.uc-expo .uc-expo-offline__bar > span{ display:block; height:100%; width:0%; background: linear-gradient(135deg, var(--ucx-primary), #0ea5e9); transition: width 350ms var(--ucx-ease); }
.uc-expo .uc-expo-offline__status{ margin: 10px 0 0; color: var(--ucx-muted); font-size: 13px; }

@media (max-width: 480px){
  .uc-expo .uc-expo-section{ padding: 14px; }
  .uc-expo .uc-expo-title{ font-size: 20px; }
  .uc-expo .uc-expo-card__media{ height: 150px; }
}

/* Subtle skeleton loading utility */
.uc-expo .uc-expo-skeleton{
  position: relative;
  overflow: hidden;
  background: rgba(2,6,23,.05);
  border-radius: 12px;
}
.uc-expo .uc-expo-skeleton::after{
  content:"";
  position:absolute;
  inset:0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: ucxShimmer 1.2s var(--ucx-ease) infinite;
}
@keyframes ucxShimmer{ 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

@media (prefers-reduced-motion: reduce){
  .uc-expo .uc-expo-card,
  .uc-expo .uc-expo-btn{ transition: none !important; }
  .uc-expo .uc-expo-card:hover{ transform: none; }
  .uc-expo .uc-expo-skeleton::after{ animation: none; }
}

/* UCMe shortcode polish */
.uc-expo.uc-expo-ucme .uc-expo-ucme-card{
  max-width: 860px;
  margin: 0 auto;
  padding: 20px;
  background: linear-gradient(180deg, rgba(37,99,235,.06) 0%, rgba(255,255,255,.98) 54%);
}

.uc-expo .uc-expo-ucme-title{ margin: 0 0 8px; }
.uc-expo .uc-expo-ucme-subtitle{ margin: 0 0 14px; }
.uc-expo .uc-expo-ucme-form{ margin: 0; }

.uc-expo .uc-expo-ucme-alert{
  margin: 0 0 14px;
  font-weight: 700;
}

.uc-expo .uc-expo-ucme-setup{
  border: 1px dashed rgba(37,99,235,.30);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.75);
}

.uc-expo .uc-expo-ucme-actions{ margin: 0 0 14px; }

.uc-expo .uc-expo-ucme-embed{
  border: 1px solid var(--ucx-border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--ucx-shadow-sm);
}

.uc-expo .uc-expo-ucme-embed iframe{
  display: block;
  width: 100%;
}
