/* ═══════════════════════════════════════════════════════════════
   stp-room.css — کلاس مجازی
   ═══════════════════════════════════════════════════════════════ */

/* ── Wrapper ──────────────────────────────────────────────────── */
.stp-room-wrap {
    direction: rtl;
    font-family: inherit;
    max-width: 960px;
    margin: 0 auto;
    padding: 8px 0;
}

/* ── هدر ──────────────────────────────────────────────────────── */
.stp-room-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.stp-room-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1a1a1a;
}

.stp-room-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stp-room-name {
    font-size: 13px;
    color: #666;
}

/* ── Badge‌های وضعیت ──────────────────────────────────────────── */
.stp-live-badge {
    background: #e53935;
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    animation: stp-blink 1.5s ease-in-out infinite;
}

@keyframes stp-blink {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.7; }
}

.stp-ended-badge {
    background: #9e9e9e;
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.stp-scheduled-badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
}

/* ── لیوآوت جلسه زنده ────────────────────────────────────────── */
.stp-live-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
    align-items: flex-start;
}

@media (max-width: 700px) {
    .stp-live-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Jitsi ────────────────────────────────────────────────────── */
.stp-jitsi-wrap {
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a2e;
}

/* ── پنل Q&A ──────────────────────────────────────────────────── */
.stp-qa-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.stp-lesson-hint {
    background: #e8f5e9;
    border-right: 3px solid #2e7d32;
    border-radius: 6px;
    padding: 10px 12px;
}

.stp-lesson-hint h4 {
    margin: 0 0 4px;
    font-size: 13px;
    color: #1b5e20;
}

.stp-lesson-hint p {
    margin: 0;
    font-size: 12px;
    color: #2e7d32;
    line-height: 1.6;
}

/* ── فرم سوال ─────────────────────────────────────────────────── */
.stp-qa-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
}

.stp-qa-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    direction: rtl;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.stp-qa-form textarea:focus {
    outline: none;
    border-color: #2e7d32;
}

.stp-q-btn {
    background: #1b5e20;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.stp-q-btn:hover    { background: #2e7d32; }
.stp-q-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.stp-status-ok    { color: #2e7d32; font-size: 12px; }
.stp-status-error { color: #c62828; font-size: 12px; }

/* ── لیست Q&A ─────────────────────────────────────────────────── */
.stp-qa-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 2px;
}

.stp-qa-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    transition: background 0.2s, border-color 0.2s;
}

.stp-qa-card.stp-qa-pinned {
    background: #fffde7;
    border-color: #f9a825;
}

.stp-pin-label {
    font-size: 11px;
    color: #f9a825;
    font-weight: 500;
    margin-bottom: 4px;
}

.stp-qa-text {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.65;
    color: #222;
}

.stp-qa-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stp-qa-name {
    font-size: 11px;
    color: #999;
}

.stp-react-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    color: #666;
    transition: background 0.15s, border-color 0.15s;
}

.stp-react-btn:hover,
.stp-react-btn.stp-reacted {
    background: #fce4ec;
    border-color: #f48fb1;
    color: #c2185b;
}

.stp-qa-empty {
    text-align: center;
    color: #bbb;
    font-size: 13px;
    padding: 16px;
}

/* ── انتظار جلسه ──────────────────────────────────────────────── */
.stp-waiting-box {
    text-align: center;
    padding: 48px 24px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px dashed #e0e0e0;
}

.stp-waiting-icon { font-size: 48px; margin-bottom: 12px; }

.stp-waiting-box h3 {
    margin: 0 0 6px;
    color: #333;
}

.stp-waiting-box p {
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
}

.stp-countdown {
    font-size: 20px;
    font-weight: 600;
    color: #1b5e20;
    direction: ltr;
}

.stp-cd-unit {
    display: inline-block;
    background: #e8f5e9;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 24px;
    min-width: 44px;
    text-align: center;
}

/* ── ضبط جلسه ─────────────────────────────────────────────────── */
.stp-recording-box {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.stp-recording-box h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.stp-recording-note {
    font-size: 12px;
    color: #e65100;
    margin: 10px 0 0;
    background: #fff3e0;
    padding: 8px 10px;
    border-radius: 6px;
}

/* ── جلسات من ─────────────────────────────────────────────────── */
.stp-my-sessions { direction: rtl; }

.stp-my-sessions h3 {
    font-size: 15px;
    margin: 0 0 12px;
}

.stp-session-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stp-sc-title {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.stp-sc-meta {
    font-size: 12px;
    color: #888;
}

.stp-join-btn {
    display: inline-block;
    background: #1b5e20;
    color: #fff !important;
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none !important;
    transition: background 0.15s;
    white-space: nowrap;
}

.stp-join-btn:hover { background: #2e7d32; }

.stp-join-btn--live {
    background: #e53935;
    animation: stp-blink 1.5s infinite;
}

.stp-join-btn--live:hover { background: #c62828; }

/* ── Notice ────────────────────────────────────────────────────── */
.stp-room-notice {
    background: #fff3e0;
    border-right: 4px solid #ff9800;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    color: #e65100;
    direction: rtl;
}

.stp-room-notice.error {
    background: #ffebee;
    border-right-color: #e53935;
    color: #c62828;
}
