/*
  Copyright (c) 2026 Blue Astra Technologies LLP, India. All Rights Reserved.
  Proprietary software. Unauthorized copying or use by any means or technology
  (including AI tools) is strictly prohibited.
*/
/* =====================================================
   LIVE MEETING + MEETING OUTCOME

   Two blocks in the Meeting Room:
     .live-meeting-panel   — the call while it is running (embedded conference,
                             who is in the room, the agenda, the End button)
     .meeting-outcome-section — what the meeting produced once it ends:
                             minutes, transcript, attendees and agenda
   ===================================================== */

/* ---------- Live meeting panel ---------- */

.live-meeting-panel {
    background: var(--white);
    border: 2px solid var(--theme-primary);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.live-meeting-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.live-meeting-ident h3 {
    margin: 0.35rem 0 0.25rem 0;
    font-size: 1.2rem;
}

.live-meeting-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.82rem;
    color: var(--text-light);
}

.live-state {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--light-gray);
    color: var(--dark-gray);
}

.live-state.connecting { background: #fef3c7; color: #92400e; }
.live-state.connected  { background: #d1fae5; color: #065f46; }
.live-state.ending     { background: #fee2e2; color: #991b1b; }
.live-state.ended      { background: var(--light-gray); color: var(--dark-gray); }

/* Pulse only while the call is actually up. */
.live-state.connected::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(0.8); }
}

.live-meeting-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
}

.live-meeting-stage {
    background: #0f172a;
    border-radius: 0.75rem;
    overflow: hidden;
    min-height: 520px;
}

.live-meeting-stage iframe {
    display: block;
    width: 100%;
    border: 0;
}

.live-meeting-external {
    background: var(--theme-soft);
    border: 1px dashed var(--theme-primary);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

.live-meeting-external i {
    font-size: 2rem;
    color: var(--theme-primary);
    margin-bottom: 0.75rem;
    display: block;
}

.live-meeting-external p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.live-meeting-side {
    background: var(--light-gray);
    border-radius: 0.75rem;
    padding: 1rem;
}

.live-meeting-side h4 {
    font-size: 0.95rem;
    margin: 0 0 0.6rem 0;
}

.live-attendees {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
}

.live-attendee {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.88rem;
}

.live-attendee:last-child { border-bottom: 0; }
.live-attendee.left       { opacity: 0.55; }
.live-attendee.muted      { color: var(--text-light); font-style: italic; }

.live-attendee-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--medium-gray);
    flex-shrink: 0;
}

.live-dot.on { background: #10b981; }

.live-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--theme-soft);
    color: var(--theme-primary-dark);
    padding: 1px 6px;
    border-radius: 10px;
}

.live-tag.muted {
    background: var(--medium-gray);
    color: var(--dark-gray);
}

.live-agenda {
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: pre-wrap;
    margin: 0;
}

/* ---------- Open-meeting rows ---------- */

.live-meeting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    background: var(--theme-soft);
    border-left: 4px solid var(--theme-primary);
    border-radius: 0.5rem;
    margin-bottom: 0.6rem;
}

.live-meeting-row .live-meeting-sub {
    display: block;
    margin-top: 2px;
}

.live-meeting-buttons {
    display: flex;
    gap: 0.5rem;
}

/* The Open Meetings list is a plain stack, not the meeting-card grid. */
#liveMeetingsList.meetings-list {
    display: block;
}

/* ---------- Meeting outcome (minutes, transcript, attendees, agenda) ---------- */

.meeting-outcome-section {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.outcome-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.meeting-outcome-section h3 {
    margin: 0;
    font-size: 1.25rem;
}

.outcome-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.outcome-title {
    margin: 0.75rem 0 1.25rem 0;
    font-size: 1.05rem;
    color: var(--theme-primary-dark);
}

.outcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.outcome-card {
    background: var(--light-gray);
    border-radius: 0.75rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.outcome-card h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.7rem 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.outcome-count {
    background: var(--theme-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 999px;
}

.outcome-auto {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--theme-primary-dark);
    background: var(--theme-soft);
    padding: 2px 8px;
    border-radius: 999px;
}

.outcome-attendees,
.outcome-agenda,
.outcome-actions {
    list-style: none;
    margin: 0;
    padding: 0;
}

.outcome-attendees li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.88rem;
}

.outcome-attendees li:last-child { border-bottom: 0; }

.outcome-attendee-name { font-weight: 600; }

.outcome-attendee-mail {
    color: var(--text-light);
    font-size: 0.8rem;
}

.outcome-attendee-mins {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.78rem;
}

.outcome-agenda li,
.outcome-actions li {
    position: relative;
    padding: 0.35rem 0 0.35rem 1.1rem;
    font-size: 0.88rem;
}

.outcome-agenda li::before,
.outcome-actions li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--theme-primary);
}

.outcome-owner {
    margin-left: 0.5rem;
    font-size: 0.72rem;
    background: var(--theme-soft);
    color: var(--theme-primary-dark);
    padding: 1px 7px;
    border-radius: 10px;
}

.outcome-summary p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.outcome-pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 0.5rem;
    padding: 0.9rem;
    margin: 0;
    max-height: 320px;
    overflow-y: auto;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-dark);
}

.outcome-locked {
    background: var(--theme-soft);
    border: 1px dashed var(--theme-primary);
    border-radius: 0.5rem;
    padding: 0.9rem;
    font-size: 0.88rem;
    color: var(--dark-gray);
}

.outcome-locked i { color: var(--theme-primary); }

.outcome-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

/* Nothing else defines a danger button in the dashboard. */
.btn-danger {
    background: var(--danger);
    color: #fff;
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

@media (max-width: 900px) {
    .live-meeting-body,
    .outcome-grid {
        grid-template-columns: 1fr;
    }

    .live-meeting-stage { min-height: 360px; }
}
