/* «Инфо» — макеты WebFeed и WebFeedPhone: карточки записей, фильтры,
   панель новостей вуза. */

.info-page { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.info-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.info-titles { display: flex; flex-direction: column; gap: 4px; }
.info-titles h1 { margin: 0; font-family: var(--heading); font-size: 38px; line-height: 46px; font-weight: 600; letter-spacing: -0.8px; }
.info-sub { font-size: 15px; line-height: 20px; color: var(--text2); }
.info-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.journal-trigger { width: 44px; height: 44px; }
.journal-view, .journal-list { display: grid; gap: 12px; }
.journal-view .title, .journal-view p, .journal-card h3 { margin: 0; }
.journal-view [hidden], .journal-status:empty { display: none; }
.journal-card {
  display: grid; justify-items: start; gap: 8px; padding: 16px; border-radius: 18px;
  background: var(--surface); min-width: 0; overflow-wrap: anywhere;
}
.journal-card h3 { font-family: var(--heading); font-size: 18px; }
.journal-text { white-space: pre-wrap; }
.journal-meta { display: grid; gap: 3px; font-size: 13px; }
.journal-actions, .journal-confirm { display: flex; gap: 8px; flex-wrap: wrap; }
.journal-confirm p { flex: 0 0 100%; }
.write-button {
  flex: none; height: 44px; padding: 0 20px 0 16px; border: 0; border-radius: 22px;
  display: flex; align-items: center; gap: 8px;
  background: var(--accent); color: #0B1120; font-size: 15px; font-weight: 600; cursor: pointer;
}
.write-button .icon { width: 18px; height: 18px; vertical-align: 0; }
.info-tabs { display: none; }
.info-body { display: flex; gap: 28px; align-items: flex-start; }
.feed-column { flex: 1 1 auto; min-width: 0; max-width: 700px; display: flex; flex-direction: column; gap: 14px; }
.feed-head { display: flex; align-items: baseline; gap: 12px; }
.feed-head h2 { margin: 0; font-family: var(--heading); font-size: 19px; line-height: 24px; font-weight: 600; letter-spacing: -0.2px; }
.feed-head span { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--accent-soft); }

.filter-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; height: 36px; padding: 0 14px; border: 0; border-radius: 18px;
  background: var(--raised); color: var(--text-soft); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.filter-chip.active { background: var(--text); color: var(--bg); }

/* ---------- Карточка записи ---------- */

.feed-card { border-radius: 22px; background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-kicker { flex: 1; min-width: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--accent-soft); overflow-wrap: anywhere; }
.card-pin { display: flex; color: var(--accent-soft); }
.card-pin .icon { width: 15px; height: 15px; }
.card-more {
  flex: none; width: 28px; height: 28px; margin: -6px -6px -6px 0; padding: 0; border: 0; border-radius: 14px;
  display: grid; place-items: center; background: none; color: var(--text3); cursor: pointer;
}
.card-more:hover { background: var(--raised); }
.card-title { margin: 0; font-size: 16px; line-height: 23px; font-weight: 600; }
.card-text { margin: 0; font-size: 16px; line-height: 23px; white-space: pre-line; overflow-wrap: anywhere; }
.card-text.question { font-weight: 600; }
.due-chip {
  align-self: stretch; padding: 10px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-pale);
  font-size: 14px; line-height: 20px;
}

.gallery { display: grid; gap: 4px; border-radius: 16px; overflow: hidden; }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery .tile { position: relative; height: 132px; padding: 0; border: 0; background: var(--raised); overflow: hidden; cursor: pointer; }
.gallery.n1 .tile { height: 300px; }
.gallery.n2 .tile { height: 180px; }
.gallery .tile img, .gallery .tile video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tile-play {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 22px;
  display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); color: #FFFFFF;
}
.tile-play .icon { width: 20px; height: 20px; vertical-align: 0; }
.tile-time {
  position: absolute; right: 8px; bottom: 8px; height: 22px; padding: 0 7px; border-radius: 11px;
  display: flex; align-items: center; background: rgba(0, 0, 0, 0.6); color: #FFFFFF;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.tile-time[hidden] { display: none; }
.tile-more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(11, 17, 32, 0.55); color: #FFFFFF; font-family: var(--heading); font-size: 22px; font-weight: 600;
}

.file-row { padding: 10px 6px 10px 12px; border-radius: 16px; background: var(--raised); display: flex; align-items: center; gap: 12px; }
.file-ext {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--text2) 16%, transparent); color: var(--text2);
}
.file-ext.tone-cancel { background: color-mix(in srgb, var(--cancel) 16%, transparent); color: var(--cancel); }
.file-ext.tone-accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-soft); }
.file-ext.tone-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.file-ext.tone-teal { background: color-mix(in srgb, var(--pair1, #4FD1C5) 16%, transparent); color: var(--pair1, #4FD1C5); }
.file-text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name { font-size: 15px; line-height: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 13px; line-height: 18px; color: var(--text2); }
.file-get {
  width: 40px; height: 40px; flex-shrink: 0; padding: 0; border: 0; border-radius: 20px;
  display: grid; place-items: center; background: none; color: var(--accent-soft); cursor: pointer;
}
.file-get .icon { width: 20px; height: 20px; vertical-align: 0; }

.audio-row { padding: 10px 12px; border-radius: 16px; background: var(--raised); display: flex; align-items: center; gap: 12px; }
.audio-toggle {
  position: relative; width: 40px; height: 40px; flex-shrink: 0; padding: 0; border: 0; border-radius: 20px;
  background: var(--accent); color: #0B1120; cursor: pointer;
}
.audio-toggle > span { position: absolute; inset: 0; display: grid; place-items: center; }
.audio-toggle .icon { width: 18px; height: 18px; vertical-align: 0; }
.audio-toggle .ic-pause, .audio-row.playing .ic-play { opacity: 0; }
.audio-row.playing .ic-pause { opacity: 1; }
.audio-text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.audio-top { display: flex; justify-content: space-between; gap: 8px; }
.audio-name { font-size: 14px; line-height: 19px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audio-time { flex-shrink: 0; font-size: 12px; line-height: 19px; color: var(--text2); font-variant-numeric: tabular-nums; }
.mini-wave { position: relative; height: 18px; overflow: hidden; container-type: inline-size; }
.mini-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 3px; }
.mini-bars span { flex: none; width: 3px; border-radius: 1.5px; background: rgba(157, 170, 196, 0.32); }
.mini-bars.played span { background: var(--accent); }
.mini-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; overflow: hidden; transition: width 300ms linear; }
.mini-played .mini-bars { right: auto; width: 100cqw; }
.audio-open {
  width: 36px; height: 36px; flex-shrink: 0; padding: 0; border: 0; border-radius: 18px;
  display: grid; place-items: center; background: none; color: var(--text-soft); cursor: pointer;
}
.audio-open .icon { width: 16px; height: 16px; vertical-align: 0; }

.poll-options { display: flex; flex-direction: column; gap: 8px; }
.poll-option {
  position: relative; overflow: hidden; min-height: 44px; padding: 0 14px; border: 0; border-radius: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--raised); color: var(--text); font-size: 15px; text-align: left;
}
button.poll-option { cursor: pointer; }
.poll-option.choice.mine { box-shadow: inset 0 0 0 1.5px var(--accent); }
.poll-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(157, 170, 196, 0.14); }
.poll-option.mine .poll-fill { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.poll-label { position: relative; display: flex; align-items: center; gap: 6px; }
.poll-option.mine .poll-label { font-weight: 600; }
.poll-label .icon { width: 15px; height: 15px; color: var(--accent-soft); vertical-align: 0; }
.poll-share { position: relative; color: var(--text2); font-variant-numeric: tabular-nums; }
.poll-option.mine .poll-share { color: var(--accent-pale); }

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-by { font-size: 14px; line-height: 19px; color: var(--text2); overflow-wrap: anywhere; }
.card-by strong { font-weight: 600; color: var(--text); }
.card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.card-votes { font-size: 13px; line-height: 19px; color: var(--text2); }
.chip-reaction {
  height: 32px; padding: 0 11px; border: 0; border-radius: 16px;
  display: flex; align-items: center; gap: 5px;
  background: var(--raised); color: var(--text-soft); font-size: 13px; cursor: pointer;
}
.chip-reaction.mine { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-pale); }
.chip-reaction .icon { width: 15px; height: 15px; vertical-align: 0; }
.chip-reaction.add { padding: 0 9px; color: var(--text3); }

.card-nested { padding: 12px 14px; border-radius: 16px; background: var(--raised); display: flex; flex-direction: column; gap: 8px; }
.feed-card.birthday .card-kicker { color: var(--warn); }
.birthday-head { display: flex; align-items: center; gap: 12px; font-size: 17px; }

/* ---------- Новости вуза ---------- */

.news-panel { width: 420px; flex-shrink: 0; padding: 18px 20px 16px; border-radius: 22px; background: var(--surface); display: flex; flex-direction: column; }
.news-panel h2 { margin: 0; font-family: var(--heading); font-size: 19px; line-height: 24px; font-weight: 600; letter-spacing: -0.2px; }
.portal-row { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.portal-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-pale);
}
.portal-icon .icon { width: 18px; height: 18px; vertical-align: 0; }
.portal-text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.portal-text strong { font-size: 15px; line-height: 20px; font-weight: 600; }
.portal-text span { font-size: 13px; line-height: 18px; color: var(--text2); }
.portal-badge {
  height: 22px; padding: 0 8px; border-radius: 11px; display: flex; align-items: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-pale); font-size: 12px; font-weight: 700;
}
.news-lead { margin: 14px 0 4px; font-size: 14px; line-height: 20px; color: var(--text-soft); }
.news-soon { display: flex; flex-direction: column; }
.soon-row { padding: 12px 0; display: flex; gap: 12px; align-items: flex-start; }
.soon-row + .soon-row { border-top: 1px solid var(--line); }
.soon-icon {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  background: var(--raised); color: var(--text2);
}
.soon-icon .icon { width: 17px; height: 17px; vertical-align: 0; }
.soon-text { display: flex; flex-direction: column; gap: 2px; }
.soon-text strong { font-size: 15px; line-height: 20px; font-weight: 600; }
.soon-text span { font-size: 13px; line-height: 18px; color: var(--text2); }
.news-note { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: var(--text2); }

/* Средняя ширина: новости под лентой. */
@media (max-width: 1199px) {
  .info-body { flex-direction: column; }
  .feed-column { max-width: none; width: 100%; }
  .news-panel { width: 100%; }
}

/* ---------- Телефон ---------- */

@media (max-width: 899px) {
  .info-page { gap: 14px; }
  .info-head { margin-top: 4px; }
  .info-titles h1 { font-size: 30px; line-height: 36px; letter-spacing: -0.5px; }
  .info-sub { display: none; }
  .write-button { height: 44px; padding: 0 14px; }
  .info-tabs {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px;
    height: 44px; padding: 3px; border-radius: 22px; background: var(--surface);
  }
  .info-tabs button {
    border: 0; border-radius: 19px; background: none; color: var(--text-soft);
    font-size: 15px; font-weight: 600; cursor: pointer;
  }
  .info-tabs button.active { background: var(--text); color: var(--bg); }
  .info-page.tab-feed .news-panel { display: none; }
  .feed-head { display: none; }
  .info-page.tab-news .feed-column { display: none; }
  .feed-card { padding: 16px; }
  .gallery .tile { height: 88px; }
  .gallery.n2 .tile { height: 130px; }
  .gallery.n1 .tile { height: 220px; }
  .card-foot { align-items: flex-start; }
}
