/* ==========================================================================
   15. Public chat
   ========================================================================== */

.public-chat-v1-page {
    padding: 32px 16px 96px;
}

.public-chat-v1-hero {
    margin-bottom: 24px;
}

.public-chat-v1-hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 32px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(248, 188, 74, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(85, 211, 154, 0.13), transparent 28%),
        rgba(10, 12, 18, 0.82);
    box-shadow: var(--shadow);
}

.public-chat-v1-hero-shell--single {
    grid-template-columns: minmax(0, 1fr);
}

.public-chat-v1-kicker,
.public-chat-v1-section-kicker {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f7c86f;
}

.public-chat-v1-hero-copy h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.public-chat-v1-subtext {
    max-width: 62ch;
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.public-chat-v1-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.public-chat-v1-badge-row--hero {
    gap: 12px;
    margin-top: 22px;
}

.public-chat-v1-stat-badge,
.public-chat-v1-highlight-mini,
.public-chat-v1-highlight-card,
.public-chat-v1-guidelines-card,
.public-chat-v1-feed-card,
.public-chat-v1-composer,
.public-chat-v1-side-card,
.public-chat-v1-card {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 12, 18, 0.52);
    backdrop-filter: blur(12px);
}

.public-chat-v1-stat-badge {
    display: inline-grid;
    gap: 6px;
    padding: 14px 16px;
    min-width: 126px;
}

.public-chat-v1-stat-badge strong {
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.05em;
}

.public-chat-v1-stat-badge span {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-chat-v1-highlight-card {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 24px;
}

.public-chat-v1-highlight-card span,
.public-chat-v1-highlight-mini span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.public-chat-v1-highlight-card strong {
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.05em;
}

.public-chat-v1-highlight-card em {
    color: #f3d7a1;
    font-style: normal;
    line-height: 1.7;
}

.public-chat-v1-highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.public-chat-v1-highlight-mini {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.public-chat-v1-highlight-mini strong {
    font-size: 18px;
    letter-spacing: -0.04em;
}

.public-chat-v1-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.public-chat-v1-layout--single {
    grid-template-columns: minmax(0, 1fr);
}

.public-chat-v1-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.public-chat-v1-guidelines-card,
.public-chat-v1-side-card {
    padding: 24px;
    box-shadow: var(--shadow);
}

.public-chat-v1-guidelines-head,
.public-chat-v1-side-head,
.public-chat-v1-card-head {
    display: flex;
    gap: 16px;
    align-items: start;
    justify-content: space-between;
}

.public-chat-v1-guidelines-head h2,
.public-chat-v1-side-head h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.public-chat-v1-guidelines-chip,
.public-chat-v1-system-chip,
.public-chat-v1-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-chat-v1-guidelines-chip,
.public-chat-v1-system-chip {
    background: rgba(255, 255, 255, 0.04);
    color: #f6e7be;
}

.public-chat-v1-badge {
    background: rgba(255, 255, 255, 0.04);
    color: #f2d7e4;
}

.public-chat-v1-badge.is-admin {
    background: rgba(255, 102, 146, 0.14);
    border-color: rgba(255, 102, 146, 0.3);
    color: #ffdce8;
}

.public-chat-v1-badge.is-creator {
    background: rgba(85, 211, 154, 0.12);
    border-color: rgba(85, 211, 154, 0.26);
    color: #d9ffef;
}

.public-chat-v1-badge.is-verified {
    background: rgba(247, 200, 111, 0.14);
    border-color: rgba(247, 200, 111, 0.3);
    color: #fff0c8;
}

.public-chat-v1-badge.is-guest {
    background: rgba(100, 198, 255, 0.12);
    border-color: rgba(100, 198, 255, 0.22);
    color: #dff4ff;
}

.public-chat-v1-badge.is-founding-member {
    background: rgba(247, 200, 111, 0.16);
    border-color: rgba(247, 200, 111, 0.32);
    color: #ffeabf;
}

.public-chat-v1-badge.is-founding-creator {
    background: rgba(255, 93, 168, 0.16);
    border-color: rgba(255, 93, 168, 0.3);
    color: #ffd7e8;
}

.public-chat-v1-guidelines-grid,
.public-chat-v1-side-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.public-chat-v1-guidelines-grid p,
.public-chat-v1-side-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.public-chat-v1-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.public-chat-v1-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-chat-v1-filter-chip {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    color: #f5d7e5;
    border-radius: 999px;
    padding: 10px 16px;
    font: inherit;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.public-chat-v1-filter-chip:hover,
.public-chat-v1-filter-chip.is-active {
    transform: translateY(-1px);
    border-color: rgba(247, 200, 111, 0.32);
    background: rgba(247, 200, 111, 0.12);
    color: #fff2cc;
}

.public-chat-v1-toolbar-note {
    color: var(--muted);
    font-size: 13px;
}

.public-chat-v1-feed-card {
    overflow: hidden;
    box-shadow: var(--shadow);
}

.public-chat-v1-feed {
    display: grid;
    gap: 12px;
    max-height: min(74vh, 980px);
    padding: 18px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.public-chat-v1-entry {
    display: grid;
    gap: 8px;
    align-items: start;
}

.public-chat-v1-entry--member {
    grid-template-columns: minmax(0, 1fr);
}

.public-chat-v1-entry--system {
    grid-template-columns: minmax(0, 1fr);
}

.public-chat-v1-avatar,
.public-chat-v1-system-mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
}

.public-chat-v1-avatar {
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.public-chat-v1-system-mark {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(247, 200, 111, 0.22), transparent 46%),
        rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(247, 200, 111, 0.16);
    color: #fff0c8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.public-chat-v1-entry--wall .public-chat-v1-system-chip {
    border-color: rgba(85, 211, 154, 0.24);
    color: #d9ffef;
}

.public-chat-v1-entry--auctions .public-chat-v1-system-chip {
    border-color: rgba(100, 198, 255, 0.24);
    color: #d8f4ff;
}

.public-chat-v1-entry--drops .public-chat-v1-system-chip {
    border-color: rgba(247, 200, 111, 0.24);
    color: #fff1ca;
}

.public-chat-v1-card {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
}

.public-chat-v1-author-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.public-chat-v1-card-head {
    gap: 10px;
    align-items: center;
}

.public-chat-v1-author-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.public-chat-v1-author-row strong,
.public-chat-v1-card-head h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.public-chat-v1-entry .public-chat-v1-system-chip,
.public-chat-v1-entry .public-chat-v1-badge {
    padding: 4px 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
}

.public-chat-v1-author-row .public-chat-v1-badge-row {
    gap: 6px;
}

.public-chat-v1-handle,
.public-chat-v1-time,
.public-chat-v1-system-detail {
    color: var(--muted);
    font-size: 12px;
}

.public-chat-v1-time {
    white-space: nowrap;
    align-self: flex-start;
}

.public-chat-v1-message-body,
.public-chat-v1-system-body,
.public-chat-v1-system-detail,
.public-chat-v1-deleted {
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
}

.public-chat-v1-message-body {
    color: #f7e8ef;
}

.public-chat-v1-system-body {
    color: #f7edd0;
}

.public-chat-v1-mention {
    color: #f7c86f;
    font-weight: 700;
}

.public-chat-v1-deleted {
    color: #f0b6ca;
    font-style: italic;
}

.public-chat-v1-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.public-chat-v1-action-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
}

.public-chat-v1-action-btn:hover {
    color: #fff0c8;
}

.public-chat-v1-action-btn.is-danger:hover {
    color: #ffb9cd;
}

.public-chat-v1-composer {
    position: sticky;
    bottom: 14px;
    display: grid;
    gap: 14px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.public-chat-v1-input {
    width: 100%;
    min-height: 108px;
    resize: vertical;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    color: #f7e8ef;
    padding: 16px 18px;
    font: inherit;
    line-height: 1.7;
}

.public-chat-v1-input:focus {
    outline: none;
    border-color: rgba(247, 200, 111, 0.36);
    box-shadow: 0 0 0 3px rgba(247, 200, 111, 0.08);
}

.public-chat-v1-composer-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.public-chat-v1-feedback {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.public-chat-v1-feedback.is-success {
    background: rgba(85, 211, 154, 0.1);
    border-color: rgba(85, 211, 154, 0.24);
    color: #d9ffef;
}

.public-chat-v1-feedback.is-error {
    background: rgba(255, 102, 146, 0.12);
    border-color: rgba(255, 102, 146, 0.26);
    color: #ffd7e5;
}

.public-chat-v1-empty {
    padding: 24px 18px;
}

.public-chat-v1-entry.is-flash {
    animation: public-chat-v1-flash 1.4s ease;
}

@keyframes public-chat-v1-flash {
    0% {
        transform: translateY(0);
        box-shadow: 0 0 0 0 rgba(247, 200, 111, 0.26);
    }

    35% {
        transform: translateY(-2px);
        box-shadow: 0 0 0 10px rgba(247, 200, 111, 0.08);
    }

    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 0 rgba(247, 200, 111, 0);
    }
}

@media (max-width: 1100px) {
    .public-chat-v1-hero-shell,
    .public-chat-v1-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .public-chat-v1-feed {
        max-height: none;
    }
}

@media (max-width: 720px) {
    .public-chat-v1-page {
        padding: 24px 12px 110px;
    }

    .public-chat-v1-hero-shell,
    .public-chat-v1-guidelines-card,
    .public-chat-v1-side-card,
    .public-chat-v1-feed,
    .public-chat-v1-composer {
        padding: 18px;
    }

    .public-chat-v1-entry--member,
    .public-chat-v1-entry--system {
        grid-template-columns: minmax(0, 1fr);
    }

    .public-chat-v1-card {
        padding: 16px;
    }

    .public-chat-v1-composer {
        bottom: 10px;
    }

    .public-chat-v1-composer-footer {
        align-items: stretch;
    }

    .public-chat-v1-composer-footer .btn {
        width: 100%;
    }
}
