/* ============================================================
 * Ralli.ee Otseülekanded – stream single page styles
 * ============================================================ */

.ralli-stream-page {
    --ralli-blue: #3068ab;
    --ralli-red: #e60000;
    --ralli-bg: #f5f7fa;
    --ralli-border: #e1e5ea;
    --ralli-text: #1a1a1a;
    --ralli-muted: #6b7280;
    width: 100%;
    color: var(--ralli-text);
    background: white;
}

/* ----- Header (title + meta) — container-laius ----- */

.ralli-stream-header {
    max-width: 1230px;
    margin: 0 auto;
    padding: 25px 1rem 20px;
    box-sizing: border-box;
}

.ralli-stream-badge-row {
    margin-bottom: 12px;
}

.ralli-stream-upcoming-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--ralli-muted);
    margin-bottom: 10px;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .ralli-stream-upcoming-text { font-size: 18px; }
}

.ralli-stream-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: white;
}

.ralli-stream-badge-live {
    background: var(--ralli-red);
    animation: ralli-pulse 1.6s ease-in-out infinite;
}

.ralli-stream-badge-upcoming { background: var(--ralli-blue); }
.ralli-stream-badge-ended    { background: #555; }

@keyframes ralli-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 0, 0, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(230, 0, 0, 0); }
}

.ralli-stream-title {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;
    margin: 0 0 18px 0;
    color: var(--ralli-text);
}

@media (min-width: 768px) { .ralli-stream-title { font-size: 34px; } }
@media (min-width: 1200px) { .ralli-stream-title { font-size: 40px; } }

/* ----- Meta bar ----- */

.ralli-stream-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--ralli-border);
    border-bottom: 1px solid var(--ralli-border);
    font-size: 14px;
}

.ralli-stream-meta-left {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--ralli-muted);
    align-items: center;
}

.ralli-stream-meta-left > * + *::before {
    content: " • ";
    margin-right: 8px;
    color: var(--ralli-border);
}

.ralli-stream-categories a {
    color: var(--ralli-blue);
    text-decoration: none;
    font-weight: 500;
}

.ralli-stream-share {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ralli-stream-share .share {
    padding: 5px 12px;
    border-radius: 3px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.ralli-stream-share .share:hover { opacity: 0.85; }
.ralli-stream-share .fb { background: #1877f2; }
.ralli-stream-share .tw { background: #000; }
.ralli-stream-share .wa { background: #25d366; }

/* ----- Video — fallback kui Firebase puudub (container-laiuses) ----- */

.ralli-stream-video-fullwidth {
    max-width: 1230px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    background: transparent;
}

.ralli-stream-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.ralli-stream-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ============================================================
 * Theater mode — video + chat kõrvuti (YouTube "kinoekraan")
 * ============================================================ */

.ralli-live-stream-wrapper {
    background: #000;
    width: 100%;
}

.ralli-live-stream-inner {
    max-width: 1480px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
    box-sizing: border-box;
}

/* Video — 72% laiusest */
.ralli-live-video {
    flex: 1 1 72%;
    min-width: 0;
    background: #000;
    display: flex;
    align-items: center;
    border-radius: 3px;
    overflow: hidden;
}

.ralli-live-video .ralli-stream-video {
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* Chat — 28% laiusest, eraldi kastina video kõrval */
#ralli-chat.ralli-live-chat {
    flex: 0 0 28%;
    max-width: 420px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: 3px;
    margin: 0;
    overflow: hidden;
}

/* Chati sõnumiala täidab üle jäänud ruumi ja kerib SEES (ei veni kasti) */
.ralli-live-chat .ralli-chat-messages {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    overflow-y: auto;
}

.ralli-live-chat .ralli-chat-header,
.ralli-live-chat .ralli-chat-input-wrap,
.ralli-live-chat .ralli-chat-info,
.ralli-live-chat .ralli-chat-locked-msg {
    flex: 0 0 auto;
}

/* Lukus/lõppenud teade (sisendvälja asemel) */
.ralli-chat-locked-msg {
    padding: 14px 18px;
    background: #f5f7fa;
    border-top: 1px solid var(--ralli-border);
    color: var(--ralli-muted);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.ralli-chat-locked-msg[hidden] { display: none !important; }

/* Mobiil: üks veerg, video üleval, chat all */
@media (max-width: 992px) {
    .ralli-live-stream-inner {
        flex-direction: column;
    }
    .ralli-live-video {
        flex: 1 1 auto;
        width: 100%;
    }
    #ralli-chat.ralli-live-chat {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
        width: 100%;
        height: 520px;
    }
    /* Mobiilis pole musta tausta vaja servades */
    .ralli-live-stream-wrapper {
        background: #000;
    }
}

/* ----- Below video: 2-veerg layout ----- */

.ralli-stream-twocol {
    max-width: 1230px;
    margin: 0 auto;
    padding: 25px 1rem;
    box-sizing: border-box;
}

.ralli-stream-twocol--with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: flex-start;
}

.ralli-stream-main {
    min-width: 0;
}

/* ----- Sidebar ----- */

.ralli-stream-sidebar {
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.ralli-ot-sidebar-widget {
    margin-bottom: 18px;
}
.ralli-ot-sidebar-widget:last-child {
    margin-bottom: 0;
}
.ralli-ot-sidebar-widget .widget-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #111;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--ralli-blue);
}

@media (max-width: 900px) {
    .ralli-stream-twocol--with-sidebar {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ralli-stream-sidebar {
        position: static;
        top: auto;
    }
}

/* ----- Chat ----- */

#ralli-chat {
    --c-bg: #1c1c1c;
    --c-border: #333;
    --c-text: #ffffff;
    --c-muted: #aaaaaa;
    --c-faint: #666666;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: 3px;
    margin: 0 0 25px;
    overflow: hidden;
    color: var(--c-text);
}

/* ----- Header ----- */
.ralli-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    gap: 12px;
}

.ralli-chat-header-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
}

.ralli-chat-header-text-inner h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.ralli-chat-header-subtitle {
    font-size: 12px;
    color: var(--c-muted);
    margin-top: 2px;
    font-weight: 400;
}

.ralli-chat-livedot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #888;
    flex-shrink: 0;
}

.ralli-chat-livedot.is-live {
    background: #ff0000;
    animation: ralli-pulse-red 1.6s ease-in-out infinite;
}

@keyframes ralli-pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.55); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 0, 0, 0); }
}

/* Status — pill badge */
.ralli-chat-status {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 0;
    border-radius: 20px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    white-space: nowrap;
}

.ralli-chat-status.open    { background: rgba(74, 222, 128, 0.18); color: #6ee7a0; }
.ralli-chat-status.closed  { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
.ralli-chat-status.locked  { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

/* ----- Messages ----- */
.ralli-chat-messages {
    height: 420px;
    overflow-y: auto;
    padding: 16px 18px;
    background: var(--c-bg);
    border: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    overscroll-behavior: contain;
    color: var(--c-text);
}

.ralli-chat-messages::-webkit-scrollbar { width: 8px; }
.ralli-chat-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.ralli-chat-messages::-webkit-scrollbar-track { background: var(--c-bg); }

/* ----- Loading / Empty (tsentreeritud) ----- */
.ralli-chat-loading {
    text-align: center;
    color: var(--c-muted);
    padding: 40px 20px;
}

.ralli-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 280px;
    padding: 20px;
}

.ralli-chat-empty-icon {
    font-size: 40px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.ralli-chat-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.ralli-chat-empty-subtitle {
    font-size: 14px;
    line-height: 1.5;
    max-width: 80%;
    margin: 0 auto 18px;
    color: var(--c-muted);
}

.ralli-chat-empty-cta {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* ----- Messages list ----- */
.ralli-chat-message {
    padding: 6px 0;
    border-bottom: 1px solid #1f1f1f;
}

.ralli-chat-message:last-child { border-bottom: 0; }

.ralli-chat-message-author {
    font-weight: 600;
}

.ralli-chat-message-colon {
    color: var(--c-muted);
    margin-right: 6px;
}

.ralli-chat-message.verified .ralli-chat-message-author::after {
    content: " \2713";
    font-size: 0.9em;
    color: #5fd97f;
}

.ralli-chat-message-time {
    color: var(--c-faint);
    font-size: 11px;
    margin-left: 6px;
}

.ralli-chat-message-text {
    word-wrap: break-word;
    overflow-wrap: anywhere;
    color: var(--c-text);
}

/* ----- Input ----- */
/* ----- Input (minimalistlik pill + emoji) ----- */
.ralli-chat-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
    position: relative;
}

.ralli-chat-input-wrap[hidden] { display: none !important; }

/* Nimeväli — kompaktne, ainult anonüümsel kuni nimi seatud */
#ralli-chat .ralli-chat-name {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 14px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--c-border);
    background: #2a2a2a !important;
    color: var(--c-text) !important;
    border-radius: 20px;
}
#ralli-chat .ralli-chat-name::placeholder { color: var(--c-faint); }
#ralli-chat .ralli-chat-name:focus {
    outline: none;
    border-color: #555;
    background: #2a2a2a !important;
}
#ralli-chat .ralli-chat-name:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
#ralli-chat .ralli-chat-name[hidden] { display: none !important; }

/* Sõnumi pill — ümar, sees tekst + emoji + saada */
.ralli-chat-input-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #2a2a2a !important;
    border: 1px solid var(--c-border);
    border-radius: 22px;
    padding: 2px 6px 2px 16px;
    transition: border-color 0.15s;
}
.ralli-chat-input-pill:focus-within {
    border-color: #555;
}

#ralli-chat .ralli-chat-text {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    color: var(--c-text) !important;
    font-size: 14px;
    font-family: inherit;
    padding: 9px 0;
    outline: none;
    box-shadow: none !important;
}
#ralli-chat .ralli-chat-text::placeholder { color: var(--c-faint); }
#ralli-chat .ralli-chat-text:focus {
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
}

.ralli-chat-emoji-btn,
.ralli-chat-send {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.ralli-chat-emoji-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.ralli-chat-send {
    color: var(--c-faint);
}
.ralli-chat-send.is-active {
    color: #fff;
    background: #e60000;
}
.ralli-chat-send.is-active:hover {
    background: #c00000;
}
.ralli-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Emoji panel */
.ralli-chat-emoji-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px;
    background: #2a2a2a;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    position: absolute;
    bottom: calc(100% - 4px);
    right: 14px;
    left: 14px;
    z-index: 5;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.ralli-chat-emoji-panel[hidden] { display: none !important; }

.ralli-chat-emoji-panel button {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s;
}
.ralli-chat-emoji-panel button:hover {
    background: rgba(255,255,255,0.1);
}

@media (max-width: 600px) {
    .ralli-chat-messages { height: 320px; }
    /* iOS Safari zoom'ib sisendiväljadele kui font < 16px — väldime selle */
    #ralli-chat .ralli-chat-text,
    #ralli-chat .ralli-chat-name {
        font-size: 16px;
    }
}

/* ----- Locked message (sisendvälja asemel) ----- */
.ralli-chat-locked-msg {
    padding: 16px 18px;
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
    color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.ralli-chat-locked-msg[hidden] { display: none !important; }

/* ----- Footer rules (väga diskreetne) ----- */
.ralli-chat-info {
    margin: 0;
    padding: 10px 18px 12px;
    font-size: 11px;
    color: #666666;
    line-height: 1.4;
    text-align: center;
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
}

.ralli-chat-error {
    background: rgba(230, 0, 0, 0.15);
    color: #ff6b6b;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 13px;
    margin: 8px 18px;
    display: none;
}

.ralli-chat-error.show { display: block; }

/* ----- Description ----- */

.ralli-stream-content {
    line-height: 1.6;
}

/* ============================================================
 * /otse/ archive page
 * ============================================================ */

.ralli-ot-archive-page {
    --ralli-blue: #3068ab;
    --ralli-red: #e60000;
    --ralli-bg: #f5f7fa;
    --ralli-border: #e1e5ea;
    --ralli-text: #1a1a1a;
    --ralli-muted: #6b7280;
    color: var(--ralli-text);
    background: white;
    width: 100%;
}

.ralli-ot-archive-container {
    max-width: 1230px;
    margin: 0 auto;
    padding: 30px 1rem 50px;
    box-sizing: border-box;
}

/* Header + filter */

.ralli-ot-archive-header {
    margin-bottom: 30px;
}

.ralli-ot-archive-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 18px 0;
    color: var(--ralli-text);
}

@media (min-width: 768px) {
    .ralli-ot-archive-title { font-size: 40px; }
}

.ralli-ot-archive-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--ralli-border);
    padding-bottom: 14px;
}

.ralli-ot-archive-page .ralli-ot-filter-btn {
    padding: 8px 16px;
    border-radius: 3px;
    background: var(--ralli-bg);
    color: var(--ralli-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--ralli-border);
    transition: all 0.15s;
}

.ralli-ot-filter-btn:hover {
    background: #e8edf3;
    text-decoration: none;
}

.ralli-ot-archive-page .ralli-ot-filter-btn.is-active,
.ralli-ot-archive-page .ralli-ot-filter-btn.is-active:hover {
    background: #555;
    color: #fff !important;
    border-color: #555;
}

/* Sections */

.ralli-ot-section {
    margin-bottom: 40px;
}

.ralli-ot-section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 18px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ralli-border);
}

.ralli-ot-section-live .ralli-ot-section-title {
    border-bottom-color: var(--ralli-red);
    color: var(--ralli-red);
}

.ralli-ot-section-upcoming .ralli-ot-section-title {
    border-bottom-color: var(--ralli-blue);
}

/* Grid */

.ralli-ot-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.ralli-ot-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

@media (max-width: 600px) {
    .ralli-ot-grid,
    .ralli-ot-grid-large {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Card */

.ralli-ot-card {
    background: white;
    border: 1px solid var(--ralli-border);
    border-radius: 3px;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ralli-ot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.ralli-ot-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ralli-ot-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #ddd;
}

.ralli-ot-card-cat {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 10px;
    background: rgba(48, 104, 171, 0.95);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 3px;
}

.ralli-ot-card-livebadge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    background: var(--ralli-red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 3px;
    animation: ralli-pulse 1.6s ease-in-out infinite;
}

.ralli-ot-card-live {
    border-color: var(--ralli-red);
    border-width: 2px;
}

.ralli-ot-card-body {
    padding: 14px 16px;
}

.ralli-ot-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.35;
    color: var(--ralli-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ralli-ot-card-large .ralli-ot-card-title {
    font-size: 18px;
}

.ralli-ot-card-time {
    font-size: 13px;
    color: var(--ralli-muted);
}

/* Pagination */

.ralli-ot-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.ralli-ot-pagination .page-numbers {
    padding: 8px 14px;
    border: 1px solid var(--ralli-border);
    border-radius: 3px;
    text-decoration: none;
    color: var(--ralli-text);
    font-size: 14px;
    font-weight: 500;
    background: white;
    transition: all 0.15s;
}

.ralli-ot-pagination .page-numbers:hover {
    background: var(--ralli-bg);
}

.ralli-ot-pagination .page-numbers.current {
    background: var(--ralli-blue);
    color: white;
    border-color: var(--ralli-blue);
}

.ralli-ot-pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}

/* Empty state */

.ralli-ot-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ralli-muted);
    background: var(--ralli-bg);
    border-radius: 3px;
}

/* Hero card — kui ainult 1-2 live stream'i on, suuremad kaardid */
.ralli-ot-grid-hero {
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 800px) {
    .ralli-ot-grid-hero { grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); }
}

.ralli-ot-card-hero .ralli-ot-card-title {
    font-size: 22px;
    -webkit-line-clamp: 2;
}
@media (min-width: 800px) {
    .ralli-ot-card-hero .ralli-ot-card-title { font-size: 26px; }
}

.ralli-ot-card-hero .ralli-ot-card-livebadge {
    padding: 7px 16px;
    font-size: 13px;
}

.ralli-ot-card-hero .ralli-ot-card-cat {
    padding: 6px 14px;
    font-size: 12px;
}

.ralli-ot-card-hero .ralli-ot-card-body {
    padding: 18px 22px;
}

/* Section count (e.g. "Tulemas (5)") */
.ralli-ot-section-count {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 10px;
    background: var(--ralli-bg);
    color: var(--ralli-muted);
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    vertical-align: middle;
}

.ralli-ot-section-live .ralli-ot-section-count {
    background: var(--ralli-red);
    color: white;
}

/* Empty section state */
.ralli-ot-section-empty {
    padding: 30px 20px;
    text-align: center;
    color: var(--ralli-muted);
    background: var(--ralli-bg);
    border-radius: 3px;
    font-size: 14px;
}

/* ============================================================
 * Seotud uudised — list view (horisontaalsed kaardid)
 * ============================================================ */

.ralli-related {
    margin-top: 10px;
}

.ralli-related-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ralli-blue);
}

.ralli-related-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ralli-related-card {
    border-bottom: 1px solid var(--ralli-border);
    padding-bottom: 18px;
}
.ralli-related-card:last-child { border-bottom: 0; padding-bottom: 0; }

.ralli-related-card-link {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

.ralli-related-card-thumb {
    flex: 0 0 38%;
    max-width: 38%;
    aspect-ratio: 16 / 10;
    border-radius: 3px;
    overflow: hidden;
    background: #e9edf1;
}

.ralli-related-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ralli-related-card-body {
    flex: 1 1 62%;
    min-width: 0;
}

.ralli-related-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--ralli-text);
}

.ralli-related-card-link:hover .ralli-related-card-title {
    color: var(--ralli-blue);
}

.ralli-related-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--ralli-muted);
    margin-bottom: 8px;
}

.ralli-related-author {
    color: var(--ralli-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ralli-related-date,
.ralli-related-comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ralli-related-date svg,
.ralli-related-comments svg {
    opacity: 0.7;
}

.ralli-related-card-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .ralli-related-card-link {
        flex-direction: column;
    }
    .ralli-related-card-thumb {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
        aspect-ratio: 16 / 9;
    }
    .ralli-related-card-body {
        flex: 1 1 auto;
    }
}

/* ============================================================
 * /otse/ archive — HERO block (suur horisontaalne, pilt vasakul)
 * ============================================================ */

.ralli-ot-hero-section {
    margin-bottom: 40px;
}

.ralli-ot-hero {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    border-radius: 3px;
    overflow: hidden;
    background: #0f0f0f;
    min-height: 340px;
    transition: box-shadow 0.2s;
}

.ralli-ot-hero:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.ralli-ot-hero-thumb {
    position: relative;
    flex: 1 1 58%;
    max-width: 58%;
    background-size: cover;
    background-position: center;
    background-color: #222;
    min-height: 340px;
}

.ralli-ot-hero-livebadge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 7px 16px;
    background: var(--ralli-red);
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 3px;
    animation: ralli-pulse 1.6s ease-in-out infinite;
}

.ralli-ot-hero-body {
    flex: 1 1 42%;
    padding: 32px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.ralli-ot-hero-cat {
    align-self: flex-start;
    padding: 5px 12px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 14px;
}

.ralli-ot-hero-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 14px;
    color: var(--ralli-text);
}

@media (min-width: 1100px) {
    .ralli-ot-hero-title { font-size: 32px; }
}

.ralli-ot-hero-time {
    font-size: 15px;
    color: var(--ralli-muted);
    margin-bottom: 22px;
}

.ralli-ot-hero-cta {
    align-self: flex-start;
    padding: 11px 24px;
    background: var(--ralli-blue);
    color: white;
    font-size: 15px;
    font-weight: 700;
    border-radius: 3px;
    transition: background 0.15s;
}

.ralli-ot-hero:hover .ralli-ot-hero-cta {
    background: #224d80;
}

.ralli-ot-hero-live .ralli-ot-hero-cta {
    background: var(--ralli-red);
}
.ralli-ot-hero-live:hover .ralli-ot-hero-cta {
    background: #b80000;
}

/* Mobiil: vertikaalne — pilt üleval, info all */
@media (max-width: 768px) {
    .ralli-ot-hero {
        flex-direction: column;
        min-height: 0;
    }
    .ralli-ot-hero-thumb {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
    .ralli-ot-hero-body {
        flex: 1 1 auto;
        padding: 22px 20px;
    }
    .ralli-ot-hero-title { font-size: 22px; }
}

/* Archive intro (SEO + selgitus) */
.ralli-ot-archive-intro {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ralli-muted);
    max-width: 760px;
    margin: 0 0 18px;
}

/* Hero eyebrow row (staatus + kategooria) */
.ralli-ot-hero-eyebrow-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.ralli-ot-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 3px;
}

.ralli-ot-hero-eyebrow-live {
    background: var(--ralli-red);
    color: white;
    animation: ralli-pulse 1.6s ease-in-out infinite;
}

.ralli-ot-hero-eyebrow-upcoming {
    background: #eef2f7;
    color: var(--ralli-blue);
    border: 1px solid #d4dde8;
}

/* Eyebrow-row sees kategooria badge ei vaja enam alumist marginaali */
.ralli-ot-hero-eyebrow-row .ralli-ot-hero-cat {
    margin-bottom: 0;
}

/* ----- Sõnumi 3-punkti menüü (kustutamine) ----- */
.ralli-chat-message.has-menu {
    position: relative;
    padding-right: 28px;
}

.ralli-chat-msg-menu {
    position: absolute;
    top: 4px;
    right: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--c-faint);
    cursor: pointer;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.12s, background 0.12s, color 0.12s;
    padding: 0;
}

.ralli-chat-message.has-menu:hover .ralli-chat-msg-menu {
    opacity: 1;
}

.ralli-chat-msg-menu:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Mobiilis pole hover'it — näita menüü-nuppu alati */
@media (hover: none) {
    .ralli-chat-message.has-menu .ralli-chat-msg-menu { opacity: 0.6; }
}

.ralli-chat-msg-actions {
    position: absolute;
    top: 28px;
    right: 0;
    z-index: 10;
    background: #2a2a2a;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    overflow: hidden;
    min-width: 120px;
}
.ralli-chat-msg-actions[hidden] { display: none !important; }

.ralli-chat-msg-delete {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 14px;
    border: 0;
    background: transparent;
    color: #ff6b6b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
.ralli-chat-msg-delete:hover {
    background: rgba(255,107,107,0.12);
}
.ralli-chat-msg-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
