/* Stream Questions — dedicated tab UI */

.sq-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sq-shell > .ps-card--hero {
    margin-bottom: 0;
}

.sq-composer,
.sq-mine,
.sq-admin,
.sq-obs-link {
    position: relative;
    width: 100%;
    min-width: 0;
    border-radius: var(--glhf-radius-lg);
    border: 1px solid rgba(255, 255, 255, .08);
    background:
        linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
        rgba(8, 12, 16, .78);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 40px rgba(0,0,0,.18);
}

.sq-composer {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.75rem 1.8rem 1.6rem;
}

.sq-mine { padding: 1.5rem 1.6rem 1.55rem; }
.sq-admin { padding: 1.45rem 1.5rem 1.5rem; }
.sq-obs-link { padding: 1.25rem 1.4rem 1.2rem; }

.sq-obs-link__head { margin-bottom: .85rem; }

.sq-obs-link__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sq-obs-link__url {
    flex: 1 1 240px;
    min-width: 0;
    font-family: var(--glhf-font-mono);
    letter-spacing: .03em;
    user-select: none;
}

.sq-obs-link__msg {
    margin: .55rem 0 0;
    min-height: 1.2em;
    font-size: .82rem;
    color: #f87171;
}

.sq-obs-link__msg.is-ok { color: #86efac; }

.sq-composer__head { margin-bottom: 0; }

.sq-mine__head,
.sq-admin__head {
    margin-bottom: 1rem;
}

.sq-composer__title,
.sq-mine__title,
.sq-admin__title,
.sq-obs-link__title,
.sq-dialog__title {
    margin: 0 0 .35rem;
    font-family: var(--glhf-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--glhf-text-primary);
}

.sq-composer__hint,
.sq-mine__sub,
.sq-admin__sub,
.sq-dialog__text {
    margin: 0;
    color: var(--glhf-text-muted);
    font-size: .95rem;
    line-height: 1.55;
}

.sq-composer__editor {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(var(--glhf-accent-rgb), .2);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.03), transparent 28%),
        rgba(0, 0, 0, .32);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.sq-composer__editor:focus-within {
    border-color: rgba(var(--glhf-accent-rgb), .5);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.05),
        0 0 0 3px rgba(var(--glhf-accent-rgb), .12);
}

.sq-composer__field {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 160px;
    margin: 0;
    padding: 1.2rem 1.25rem .55rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--glhf-text-primary);
    font-family: var(--glhf-font-body);
    font-size: 1.08rem;
    line-height: 1.65;
    resize: vertical;
    outline: none;
    box-shadow: none;
}

.sq-composer__field::placeholder {
    color: var(--glhf-text-muted);
    opacity: .78;
}

.sq-composer__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: .55rem 1.2rem .85rem;
    min-height: 1.4em;
    border-top: 1px solid rgba(255,255,255,.05);
}

.sq-count {
    font-size: .82rem;
    font-weight: 600;
    color: var(--glhf-text-muted);
}

.sq-count.is-near { color: var(--glhf-accent); }
.sq-count.is-max { color: #f87171; }

.sq-form-msg {
    font-size: .84rem;
    color: #f87171;
    text-align: right;
}

.sq-form-msg.is-ok { color: #86efac; }

.sq-submit {
    width: 100%;
    min-height: 54px;
}

.sq-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sq-toolbar__meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sq-stat {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(var(--glhf-accent-rgb), .12);
    border: 1px solid rgba(var(--glhf-accent-rgb), .22);
    color: var(--glhf-accent);
    font-size: .78rem;
    font-weight: 700;
}

.sq-stat--muted {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.08);
    color: var(--glhf-text-secondary);
}

.sq-search { min-width: min(100%, 280px); flex: 1 1 220px; }
.sq-search__input { width: 100%; }

.sq-inbox,
.sq-mine__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sq-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--glhf-text-muted);
    border: 1px dashed rgba(255,255,255,.1);
    border-radius: var(--glhf-radius-md);
}

.sq-empty strong {
    display: block;
    margin-bottom: .35rem;
    color: var(--glhf-text-primary);
    font-size: 1rem;
}

.sq-card {
    position: relative;
    padding: 1rem 1.05rem 1rem 1.15rem;
    border-radius: 16px;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.07);
    overflow: hidden;
}

.sq-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--glhf-accent), #00cca3);
}

.sq-card.is-noted::before {
    background: linear-gradient(180deg, #34d399, #059650);
}

.sq-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.sq-card__who {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sq-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,.06);
    flex-shrink: 0;
}

.sq-card__name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-weight: 700;
    color: var(--glhf-text-primary);
    font-size: .95rem;
}

.sq-card__you {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--glhf-accent);
    background: rgba(var(--glhf-accent-rgb), .12);
    border: 1px solid rgba(var(--glhf-accent-rgb), .22);
}

.sq-card.is-own {
    border-color: rgba(var(--glhf-accent-rgb), .16);
}

.sq-card__time {
    display: block;
    margin-top: 2px;
    color: var(--glhf-text-muted);
    font-size: .78rem;
}

.sq-card__text {
    margin: .85rem 0 0;
    color: var(--glhf-text-secondary);
    font-size: 1.02rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.sq-card__note {
    margin-top: .95rem;
    padding-top: .85rem;
    border-top: 1px solid rgba(255,255,255,.06);
}

.sq-card__note-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: .45rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--glhf-accent);
}

.sq-note-status {
    font-size: .72rem;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
    color: var(--glhf-text-muted);
}

.sq-note-status.is-ok { color: #86efac; }
.sq-note-status.is-err { color: #f87171; }

.sq-card__note-field {
    display: block;
    width: 100%;
    min-height: calc(1.55em * 3 + 1.5rem);
    max-height: none;
    resize: none;
    overflow: hidden;
    field-sizing: content;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.sq-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: .85rem;
}

.sq-icon-btn,
.sq-btn-danger {
    border: 0;
}

.sq-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    color: var(--glhf-text-muted);
    cursor: pointer;
    transition: all .18s ease;
}

.sq-icon-btn:hover {
    background: rgba(248, 113, 113, .14);
    color: #fca5a5;
}

.sq-btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
}

.sq-btn-danger:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(239, 68, 68, .28);
}

.sq-dialog {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.sq-dialog[hidden] { display: none; }

.sq-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 8, .72);
    backdrop-filter: blur(6px);
}

.sq-dialog__card {
    position: relative;
    width: min(440px, 100%);
    padding: 1.4rem 1.35rem 1.25rem;
    border-radius: 18px;
    background: #11171c;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
}

.sq-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 1.15rem;
}

.sq-tab-pulse {
    box-shadow: 0 0 0 0 rgba(var(--glhf-accent-rgb), .45);
    animation: sqPulse 1.8s ease-out 1;
}

@keyframes sqPulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--glhf-accent-rgb), .45); }
    100% { box-shadow: 0 0 0 14px rgba(var(--glhf-accent-rgb), 0); }
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .sq-composer,
    .sq-mine,
    .sq-admin,
    .sq-obs-link { padding: 1.15rem 1.1rem 1.2rem; }
    .sq-composer { gap: 1.05rem; }
    .sq-composer__field { min-height: 140px; padding: 1rem 1.05rem .4rem; }
    .sq-composer__meta { padding: .5rem 1.05rem .75rem; }
    .sq-card__top { align-items: center; }
    .sq-toolbar { align-items: stretch; }
}
