/* IA Stream — modal (video view + comments)
 *
 * Styles the modal container used for:
 * - Expanded video playback
 * - Inline PeerTube comments
 *
 * Safe even if the modal is never opened.
 */

.ia-stream-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.ia-stream-modal[hidden] {
  display: none;
}

.ia-stream-modal-dialog {
  width: 100%;
  max-width: 960px;
  max-height: 100%;
  background: var(--ia-panel, #151922);
  border-radius: var(--ia-radius, 10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* Header */
.ia-stream-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ia-border, #2a3145);
}

.ia-stream-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ia-text, #e6e8ee);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ia-stream-modal-close {
  background: transparent;
  border: none;
  color: var(--ia-muted, #9aa3b2);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
}

.ia-stream-modal-close:hover {
  color: var(--ia-text, #e6e8ee);
}

/* Body */
.ia-stream-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  background: var(--ia-bg, #0f1115);
}

/* Video area */
.ia-stream-modal-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.ia-stream-modal-video iframe,
.ia-stream-modal-video video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Meta / description */
.ia-stream-modal-meta {
  padding: 12px;
  border-bottom: 1px solid var(--ia-border, #2a3145);
}

.ia-stream-modal-meta p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ia-text, #e6e8ee);
}

.ia-stream-modal-sub {
  font-size: 0.8rem;
  color: var(--ia-muted, #9aa3b2);
  margin-top: 4px;
}

/* Comments */
.ia-stream-modal-comments {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ia-stream-comment {
  background: var(--ia-card, #1b2030);
  border: 1px solid var(--ia-border, #2a3145);
  border-radius: var(--ia-radius, 10px);
  padding: 10px;
}

.ia-stream-comment-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.ia-stream-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #333;
  flex-shrink: 0;
}

.ia-stream-comment-author {
  font-size: 0.85rem;
  font-weight: 600;
}

.ia-stream-comment-time {
  font-size: 0.75rem;
  color: var(--ia-muted, #9aa3b2);
}

.ia-stream-comment-text {
  font-size: 0.85rem;
  color: var(--ia-text, #e6e8ee);
  line-height: 1.4;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .ia-stream-modal-dialog {
    max-width: 100%;
    border-radius: 0;
  }
}


/* Action bar (Like / Follow) */
.ia-stream-actions{
  display:flex;
  gap:10px;
  margin-top:12px;
  align-items:center;
  flex-wrap:wrap;
}
.ia-stream-action{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--ia-text, #eee);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}
.ia-stream-action:hover{
  background: rgba(255,255,255,0.10);
}
.ia-stream-action-status{
  margin-left:auto;
  color: var(--ia-muted, #aaa);
  font-size: 0.85rem;
}


/* Comment composer */
.ia-stream-comment-composer{
  margin-top: 10px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.15);
}
.ia-stream-comment-input{
  width:100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--ia-text, #eee);
  border-radius: 10px;
  padding: 10px;
  resize: vertical;
}
.ia-stream-comment-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:8px;
}
.ia-stream-comment-send{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--ia-text, #eee);
  padding: 8px 12px;
  border-radius: 10px;
  cursor:pointer;
}
.ia-stream-comment-send:disabled{ opacity:0.6; cursor:not-allowed; }
.ia-stream-comment-status{
  color: var(--ia-muted, #aaa);
  font-size:0.85rem;
}


/* Upload modal */
.ia-stream-upload-modal[hidden]{
  display:none !important;
}

.ia-stream-upload-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 99999;
}
.ia-stream-upload-dialog{
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow:auto;
  background: rgba(20,20,20,0.98);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
.ia-stream-upload-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ia-stream-upload-title{ font-weight: 700; color: var(--ia-text,#eee); }
.ia-stream-upload-close{
  background: transparent;
  border: 0;
  color: var(--ia-text,#eee);
  font-size: 18px;
  cursor:pointer;
}
.ia-stream-upload-body{ padding: 14px; }
.ia-stream-upload-field{ margin-bottom: 12px; }
.ia-stream-upload-field label{ display:block; font-size:0.85rem; color: var(--ia-muted,#aaa); margin-bottom: 6px; }
.ia-stream-upload-name,
.ia-stream-upload-desc,
.ia-stream-upload-file{
  width:100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--ia-text,#eee);
  border-radius: 10px;
  padding: 10px;
}
.ia-stream-upload-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top: 8px;
}
.ia-stream-upload-send{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--ia-text,#eee);
  padding: 8px 12px;
  border-radius: 10px;
  cursor:pointer;
}
.ia-stream-upload-send:disabled{ opacity:0.6; cursor:not-allowed; }
.ia-stream-upload-status{ color: var(--ia-muted,#aaa); font-size:0.85rem; }
.ia-stream-upload-note{ margin-top: 10px; color: var(--ia-muted,#aaa); font-size:0.8rem; }
