/* PATH: /public/css/components.css
   Componentes globais e shell visual (Quizio-like)
*/

/* Scrollbar discreto */
*{ scrollbar-width: thin; scrollbar-color: rgba(138,5,190,.32) transparent; }
*::-webkit-scrollbar{ width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb{ background: rgba(138,5,190,.26); border-radius: 999px; }
*::-webkit-scrollbar-track{ background: transparent; }

.vitrix-card{
  background: var(--vx-surface);
  border: 1px solid var(--vx-border-2);
  border-radius: var(--vx-r-lg);
  box-shadow: none;
}

.vitrix-modal{
  background: var(--vx-surface);
  border: 1px solid var(--vx-border-2);
  border-radius: 18px;
  box-shadow: var(--vx-shadow);
}

.vitrix-btn{
  border-radius: 16px;
  font-weight: 900;
  letter-spacing: -0.2px;
  padding: 12px 14px;
  display: flex;
}

.vitrix-btn i{ margin-right: 6px; }

.btn-primary{
  border: 0 !important;
  background: var(--vx-brand) !important;
  box-shadow: 0 12px 24px rgba(138,5,190,.14);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn-primary:hover{ filter: brightness(.98); }
.btn-primary:active{ transform: translateY(0.5px); }
.btn-primary:focus{ box-shadow: var(--vx-ring) !important; }

.btn-outline-primary{
  border-color: rgba(138,5,190,.20) !important;
  color: var(--vx-brand) !important;
  background: transparent !important;
}
.btn-outline-primary:hover{
  background: rgba(138,5,190,.06) !important;
  border-color: rgba(138,5,190,.28) !important;
}

.btn-outline-dark{
  border-color: var(--vx-border) !important;
  color: var(--vx-text) !important;
}
.btn-outline-dark:hover{
  background: rgba(11,18,32,.04) !important;
}
body[data-theme="dark"] .btn-outline-dark:hover{
  background: rgba(255,255,255,.06) !important;
}

.form-label{
  color: var(--vx-muted);
  font-weight: 800;
  font-size: 13px;
}
.form-control{
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: none;
  color: var(--vx-text);
}
.form-control::placeholder{ color: var(--vx-faint); }
.form-control:focus{
  border-color: rgba(138,5,190,.34);
  box-shadow: var(--vx-ring);
}
body[data-theme="dark"] .form-control{
  background: rgba(255,255,255,.02);
  border-color: var(--vx-border);
}

.nav-pills .nav-link{
  border-radius: 999px;
  font-weight: 900;
  padding: 10px 14px;
  border: 1px solid var(--vx-border-2);
  background: transparent;
  color: var(--vx-text);
}
.nav-pills .nav-link.active{
  background: rgba(138,5,190,.10);
  color: var(--vx-brand);
  border-color: rgba(138,5,190,.22);
}

.vx-chip{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.45rem .7rem;
  border-radius:999px;
  background: var(--vx-surface);
  border:1px solid var(--vx-border-2);
}

.vx-presence-chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  line-height: 1;
  border: 1px solid transparent;
  width: fit-content;
}

.vx-presence-chip--on{
  color: #166534;
  background: rgba(34, 197, 94, .16);
  border-color: rgba(34, 197, 94, .32);
}

.vx-presence-chip--off{
  color: #64748b;
  background: rgba(100, 116, 139, .14);
  border-color: rgba(100, 116, 139, .28);
}

.vx-section-title{
  font-weight: 950;
  letter-spacing: -0.8px;
}

/* Soft avatar */
.vx-avatar-soft{
  background: rgba(138,5,190,.10);
  border: 1px solid var(--vx-border-2);
  color: var(--vx-brand);
}

/* Soft bubble */
.vx-bubble-soft{
  background: rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 8px 10px;
  position: relative;
}
body[data-theme="dark"] .vx-bubble-soft{
  background: rgba(255,255,255,.06);
}

/* ========== TOPBAR Quizio ========== */
.vx-topbar{
  display: none;
  background: linear-gradient(135deg, var(--vx-brand), var(--vx-brand-2));
  border-bottom: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 12px 26px rgba(12,10,20,.18);
  max-width: 768px;
  margin: 0 auto;
  border-radius: 0 0 26px 26px;
}
body.vx-show-topbar .vx-topbar{ display: block; }
.vx-topbar-inner{
  min-height: 64px;
}
.vx-topbar-center{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:1;
}
.vx-brandline{
  display:flex;
  align-items:center;
  gap:10px;
}
.vx-brand{
  color:#fff;
  font-weight: 950;
  letter-spacing: -0.8px;
}
.vx-badge-soft{
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-weight: 900;
}
.vx-topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.vx-iconbtn{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: #fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  line-height:1;
  transition: transform .12s ease, background .12s ease;
}
.vx-iconbtn i{ font-size: 20px; }
.vx-iconbtn:hover{ background: rgba(255,255,255,.16); }
.vx-iconbtn:active{ transform: scale(.98); }

/* ========== PAGE HEADER (inbox-like) ========== */
.vx-page-head{
  position: relative;
  margin: 0 -12px 12px;
  padding: 16px 16px 18px;
  color: #fff;
  background: linear-gradient(180deg, var(--vx-brand), var(--vx-brand-2));
  border-bottom-left-radius: 26px;
  border-bottom-right-radius: 26px;
  overflow: hidden;
}

.vx-page-head::after{
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -46px;
  height: 120px;
  background: radial-gradient(closest-side at 50% 0%, rgba(255,255,255,.28), rgba(255,255,255,0));
  pointer-events: none;
  opacity: .75;
}

.vx-page-headTop{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.vx-page-iconBtn{
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 18px;
}

.vx-page-titleWrap{ flex: 1; min-width: 0; }
.vx-page-title{
  font-weight: 950;
  letter-spacing: -0.6px;
  font-size: 20px;
  line-height: 1.1;
}
.vx-page-subtitle{
  font-size: 12px;
  opacity: .85;
  margin-top: 2px;
}

/* ========== BOTTOM NAV Quizio ========== */
.vx-bottomnav{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 74px;
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content: space-around;
  background: linear-gradient(135deg, var(--vx-brand), var(--vx-brand-2));
  z-index: 1050;
  box-shadow: 0 -14px 28px rgba(12,10,20,.18);
  max-width: 768px;
  margin: 0 auto;
  border-radius: 26px 26px 0 0;
}

.vx-bnav-item{
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.78);
  width: 52px;
  height: 48px;
  border-radius: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: transform .12s ease, background .12s ease, color .12s ease;
}
.vx-bnav-item i{ font-size: 22px; }
.vx-bnav-item:hover{
  background: rgba(255,255,255,.12);
  color: #fff;
}
.vx-bnav-item:active{ transform: scale(.98); }

.vx-bnav-item.is-active{
  background: rgba(255,255,255,.18);
  color:#fff;
  width: 62px;
  height: 52px;
  border-radius: 20px;
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}

/* Badge no bell/chat (mantém) */
.vx-badge{
  position:absolute;
  top:-6px; right:-6px;
  background: var(--vx-danger);
  color:#fff;
  border-radius:999px;
  font-size:11px;
  padding:2px 6px;
  line-height:1;
}
