/* =========================
   ís.is — components.css
   Shared UI components (buttons, cards, modals, header, etc.)
   Depends on tokens in base.css
   ========================= */

/* ---------- Helpers ---------- */
.is-muted{ color: var(--muted); }
.is-hidden{ display:none !important; }
.is-disabled{ opacity:.55; pointer-events:none; }

/* ---------- Buttons ---------- */
.btn{
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius2);
  cursor:pointer;
  text-decoration:none;
  font-weight: 650;
  font-size: 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  user-select:none;
  white-space:nowrap;
}
.btn.small{ padding: 8px 10px; font-size: 13px; }
.btn:active{ transform: translateY(1px); }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }
.btn.fill{ background: var(--panel2); }

/* Homepage pill buttons */
.btn.pill{
  width: 100%;
  border-radius: 999px;
  padding: 16px 18px;
  font-size: 18px;
  font-weight: 750;
  background: var(--panel2);
}

/* ---------- Cards / grid ---------- */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 980px){ .grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .grid{ grid-template-columns: 1fr; } }

.card{
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 14px;
  padding: 14px;
  display:grid;
  gap: 10px;
}
.card h2{ margin:0; font-size: 16px; letter-spacing:.2px; }
.card p{ margin:0; color: var(--muted); font-size: 13px; line-height: 1.35; }

/* ---------- Banner pill ---------- */
.banner{
  max-width: 760px;
  margin: 0 auto 18px;
  padding: 0 16px;
  width: 100%;
}
.pill{
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  text-align:center;
  font-size: 14px;
}

/* ---------- Header / menu ---------- */
header.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.10);
  backdrop-filter: blur(12px);
}
html[data-theme="light"] header.site-header{ background: rgba(255,255,255,.55); }

.hdr{
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px;
  display:grid;
  grid-template-columns: 44px 1fr auto;
  align-items:center;
  gap: 10px;
}

.brand-left{
  width:44px; height:44px;
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.brand-left img{ width:26px; height:26px; opacity:.95; }

.brand-title{
  text-align:center;
  font-weight:750;
  letter-spacing:.3px;
  font-size: 20px;
  user-select:none;
}

.menu-wrap{
  position:relative;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  align-items:center;
}

.icon-btn{
  width:44px; height:44px;
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  color: var(--text);
  user-select:none;
}
.icon-btn:active{ transform: translateY(1px); }

.lang-flag{ font-size: 20px; line-height: 1; }
.lang-pill{ font-size: 12px; font-weight: 800; letter-spacing: .4px; opacity: .9; }
.lang-btn{ gap: 6px; padding: 0 10px; width: auto; min-width: 44px; }

.burger{ width:18px; height:12px; position:relative; }
.burger span{
  position:absolute; left:0; right:0;
  height:2px; border-radius:2px;
  background: currentColor;
  opacity:.92;
}
.burger span:nth-child(1){ top:0; }
.burger span:nth-child(2){ top:5px; opacity:.80; }
.burger span:nth-child(3){ bottom:0; opacity:.70; }

.menu-pop{
  position:absolute;
  top: 52px;
  width: min(260px, 86vw);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow2);
  display:none;
  overflow:hidden;
  z-index: 40;
}
/* Anchor popups to their own side */
#logoPop{
  left: 0;
  right: auto;
}

#menuPop{
  right: 0;
  left: auto;
}
.menu-pop.show{ display:block; }

.menu-item{
  width:100%;
  border:0;
  background: transparent;
  color: var(--text);
  padding: 14px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  font-weight: 650;
}
.menu-item:hover{ background: var(--panel2); }
.menu-item + .menu-item{ border-top:1px solid var(--line); }
.menu-item .hint{
  color: var(--muted);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
}

/* ---------- Layout for homepage ---------- */
main{
  flex:1;
  display:flex;
  justify-content:center;
  padding: 22px 16px 18px;
}
.wrap{
  width: min(760px, 100%);
  display:flex;
  flex-direction:column;
  gap: 14px;
  align-items:center;
  padding-top: 10px;
}
.section-title{
  color: var(--muted);
  font-weight: 800;
  letter-spacing:.2px;
  margin: 4px 8px 12px;
}
.btns{
  display:flex;
  flex-direction:column;
  gap: 12px;
  padding: 0 8px 8px;
}

/* ---------- Overlays / modals ---------- */
.overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index:50;
}
html[data-theme="light"] .overlay{ background: rgba(0,0,0,.35); }
.overlay.open{ display:flex; }

.modal{
  width: min(560px, 100%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-h{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.modal-h b{ font-size: 16px; letter-spacing:.2px; }

.close{
  border:1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
}

form{
  padding: 14px;
  display:grid;
  gap: 10px;
}
label{ font-size: 13px; color: var(--muted); margin-left: 6px; }
input, textarea{
  width:100%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
  outline:none;
  font-size: 15px;
}
textarea{ min-height: 110px; resize: vertical; }
.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width:520px){ .row{ grid-template-columns: 1fr; } }

.send{
  margin-top: 2px;
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font-weight: 800;
  cursor:pointer;
  background: var(--panel2);
}
.status{
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  padding: 0 2px 6px;
  min-height: 18px;
}

.settings-body{
  padding: 14px;
  display:grid;
  gap: 12px;
}
.toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.switch{
  display:flex;
  align-items:center;
  gap:10px;
  user-select:none;
}
.switch input{ width: 18px; height: 18px; }
.about-block span{ display:block; margin-top: 8px; line-height: 1.35; }