/* ══════════════════════════════════════════════════════════════
   TELEGRAM MOCKUP
   ══════════════════════════════════════════════════════════════ */

/* ── AUDIENCE TABS ── */
.aud-tabs { 
  display: flex; 
  gap: 10px; 
  margin-bottom: 20px; 
}

.aud-tab {
  flex: 1; 
  padding: 12px 18px; 
  border-radius: 12px;
  background: var(--surface); 
  border: 1px solid var(--border);
  font-size: 13px; 
  font-weight: 600; 
  color: var(--muted);
  cursor: pointer; 
  transition: all .3s; 
  display: flex; 
  align-items: center; 
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.aud-tab:hover { 
  border-color: rgba(var(--accent-rgb), 0.4); 
  background: var(--surface2); 
}

.aud-tab.active { 
  background: var(--surface2); 
  border-color: rgba(var(--accent-rgb), 0.4); 
  color: var(--white); 
}

/* Progress bar для автопереключения табов */
.aud-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  border-radius: 0 0 12px 12px;
  transition: width 0.3s ease;
}

.aud-tab.tab-progress::after {
  animation: tabProgress var(--tab-duration, 22s) linear forwards;
}

@keyframes tabProgress {
  from { width: 0; }
  to { width: 100%; }
}

.aud-desc-wrap { 
  min-height: 80px;
  margin-top: 4px;
}

.aud-desc { 
  display: none; 
  font-size: 15px; 
  color: var(--muted); 
  line-height: 1.7;
  animation: fadeInDesc .35s ease;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.04);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}

.aud-desc.active { 
  display: block; 
}

.aud-desc strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  display: block;
  margin-bottom: 6px;
}

/* Светлая тема */
html.light .aud-desc {
  background: rgba(var(--accent-rgb), 0.05);
  border-color: rgba(var(--accent-rgb), 0.15);
}

/* ── PHONE MOCKUP ── */
.tg-phone-wrap {
  position: relative; 
  display: flex; 
  justify-content: center;
  will-change: transform, opacity;
}

.iphone-frame {
  position: relative; 
  z-index: 1;
}

.tg-glow {
  position: absolute; 
  top: 80px; 
  left: 50%; 
  transform: translateX(-50%);
  width: 280px; 
  height: 350px; 
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.35) 0%, transparent 65%);
  pointer-events: none; 
  z-index: 0;
}

.iphone-bezel {
  width: 320px;
  background: var(--iphone-bg);
  border-radius: 44px;
  border: 2px solid rgba(17, 29, 53, 1);
  padding: 10px 8px 10px 8px;
  box-shadow: 
    0 0 0 1px rgba(var(--accent-rgb), 0.15),
    0 0 0 2.5px rgba(22, 36, 57, 1),
    0 0 0 3.5px rgba(17, 29, 52, 1),
    0 50px 100px rgba(0, 0, 0, 0.77),
    0 0 60px rgba(7, 11, 20, 1),
    inset 0 0 2px rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
}

/* ── SIDE BUTTONS ── */
.iphone-bezel::before {
  content: '';
  position: absolute; 
  left: -4px; 
  top: 120px;
  width: 3px; 
  height: 28px; 
  background: var(--iphone-btn);
  border-radius: 2px 0 0 2px;
  box-shadow: 0 36px 0 var(--iphone-btn), 0 -40px 0 var(--iphone-btn);
}

.iphone-bezel::after {
  content: '';
  position: absolute; 
  right: -4px; 
  top: 155px;
  width: 3px; 
  height: 55px; 
  background: var(--iphone-btn);
  border-radius: 0 2px 2px 0;
}

/* ── STATUS BAR ── */
.iphone-statusbar {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  padding: 2px 14px 6px;
  font-weight: 600; 
  color: #fff;
  height: 38px;
}

.sb-time { 
  flex: 1; 
  text-align: left; 
  letter-spacing: 0.3px; 
  font-size: 14px; 
  font-weight: 700; 
}

.sb-right { 
  flex: 1; 
  display: flex; 
  align-items: center; 
  justify-content: flex-end; 
  gap: 4px; 
}

/* ── DYNAMIC ISLAND ── */
.dynamic-island {
  width: 90px; 
  height: 26px; 
  flex-shrink: 0;
  background: var(--viz-bg); 
  border-radius: 16px;
  display: flex; 
  align-items: center; 
  justify-content: flex-end;
  padding-right: 10px;
  position: relative; 
  z-index: 10;
}

.di-camera {
  width: 8px; 
  height: 8px; 
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1a2a44 0%, #0a0f1a 50%, var(--viz-bg) 100%);
  border: 1px solid var(--viz-border);
  box-shadow: inset 0 0 2px rgba(60,100,200,0.3);
}

/* ── HOME INDICATOR ── */
.iphone-home-indicator {
  width: 100px; 
  height: 4px; 
  margin: 8px auto 2px;
  background: rgba(255,255,255,0.25); 
  border-radius: 3px;
}

/* ── TELEGRAM APP ── */
.tg-phone {
  width: 100%; 
  border-radius: 0; 
  overflow: hidden;
  background: var(--tg-bg);
  position: relative; 
  z-index: 1;
  display: flex; 
  flex-direction: column;
  border-radius: 0px 0px 32px 32px;
}

.tg-header {
  background: var(--tg-surface); 
  padding: 10px 12px;
  display: flex; 
  align-items: center; 
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tg-back { 
  color: var(--tg-blue); 
  font-size: 20px; 
  cursor: pointer; 
  line-height: 1; 
}

.tg-avatar {
  width: 34px; 
  height: 34px; 
  border-radius: 50%; 
  background: rgba(var(--accent-rgb), 0.25);
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 16px; 
  flex-shrink: 0;
  transition: all .4s ease;
}

.tg-hinfo { 
  flex: 1; 
}

.tg-hname { 
  font-size: 13px; 
  font-weight: 700; 
  color: #fff; 
  transition: all .3s; 
}

.tg-hstatus { 
  font-size: 10px; 
  color: var(--tg-blue); 
}

.tg-menu { 
  color: var(--muted); 
  font-size: 20px; 
  cursor: pointer; 
}

.tg-body {
  flex: 1; 
  min-height: 430px; 
  max-height: 430px; 
  overflow-y: auto;
  padding: 16px 12px; 
  display: flex; 
  flex-direction: column; 
  gap: 8px;
  background: var(--tg-chat-bg);
}

.tg-body::-webkit-scrollbar { 
  width: 3px; 
}

.tg-body::-webkit-scrollbar-thumb { 
  background: rgba(255,255,255,0.1); 
  border-radius: 3px; 
}

/* ── MESSAGE BUBBLES ── */
.tg-msg {
  max-width: 82%; 
  padding: 9px 12px; 
  border-radius: 14px;
  font-size: 13px; 
  line-height: 1.5; 
  word-break: break-word;
  animation: msgIn .35s cubic-bezier(.34,1.56,.64,1) forwards;
  opacity: 0;
}

.tg-msg-bot {
  background: var(--tg-msg-in); 
  color: var(--tg-text-in); 
  border-bottom-left-radius: 4px; 
  align-self: flex-start;
}

.tg-msg-user {
  background: var(--tg-msg-out); 
  color: #fff; 
  border-bottom-right-radius: 4px; 
  align-self: flex-end;
}

.tg-msg-time { 
  font-size: 10px; 
  color: rgba(255,255,255,0.35); 
  margin-top: 4px; 
  text-align: right; 
}

/* ── BUTTONS INSIDE BOT MESSAGE ── */
.tg-btns { 
  display: flex; 
  flex-direction: column; 
  gap: 5px; 
  margin-top: 8px; 
}

.tg-btn {
  background: rgba(var(--accent-rgb), 0.18); 
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 8px; 
  padding: 7px 10px; 
  font-size: 12px; 
  color: var(--accent-soft);
  font-weight: 600; 
  text-align: center; 
  cursor: pointer; 
  transition: background .2s;
}

.tg-btn:hover { 
  background: rgba(var(--accent-rgb), 0.3); 
}

/* ── TYPING INDICATOR ── */
.tg-typing {
  align-self: flex-start; 
  padding: 10px 14px; 
  background: var(--tg-msg-out);
  border-radius: 14px; 
  border-bottom-left-radius: 4px;
  display: flex; 
  gap: 4px; 
  align-items: center;
}

.tg-typing span {
  width: 6px; 
  height: 6px; 
  border-radius: 50%; 
  background: var(--tg-blue);
  animation: typingDot 1.2s infinite;
}

.tg-typing span:nth-child(2) { 
  animation-delay: .2s; 
}

.tg-typing span:nth-child(3) { 
  animation-delay: .4s; 
}

.tg-date-divider {
  text-align: center; 
  font-size: 11px; 
  color: rgba(255,255,255,0.25);
  padding: 4px 0; 
  margin: 4px 0;
}

/* ── INPUT BAR ── */
.tg-input-bar {
  background: var(--tg-surface); 
  padding: 10px 14px;
  display: flex; 
  align-items: center; 
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: 0px 0px 32px 32px;
}

.tg-attach { 
  font-size: 20px; 
  cursor: pointer; 
  color: var(--tg-blue); 
}

.tg-input-field {
  flex: 1; 
  background: var(--tg-input-bg); 
  border-radius: 20px;
  padding: 8px 14px; 
  font-size: 13px; 
  color: rgba(255,255,255,0.3);
}

.tg-send { 
  font-size: 18px; 
  color: var(--tg-blue); 
  cursor: pointer; 
}

/* ── FLOATING BADGES ── */
.tg-float-badge {
  position: absolute; 
  bottom: 60px; 
  right: 10px;
  background: var(--surface2); 
  border: 1px solid rgba(var(--accent3-rgb), 0.3);
  border-radius: 14px; 
  padding: 10px 16px;
  display: flex; 
  align-items: center; 
  gap: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  animation: float 3s ease-in-out infinite;
  z-index: 2; 
  opacity: 0; 
  transition: opacity .4s ease;
}

.tg-float-badge-top {
  position: absolute; 
  top: 72px; 
  left: 24px;
  background: var(--surface2); 
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 12px; 
  padding: 8px 13px;
  display: flex; 
  align-items: center; 
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: float 3.5s ease-in-out infinite; 
  animation-delay: .8s;
  z-index: 2; 
  opacity: 0; 
  transition: opacity .4s ease; 
  white-space: nowrap;
}
