/* CE Edmonton - Live Stream Styles */
:root {
    --ce-live-red:    #dc3545;
    --ce-primary:     #C8A951;
    --ce-dark:        #1a1a2e;
}

/* ── Wrap ── */
.ce-livestream-wrap { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* ── Live Header ── */
.ce-live-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ce-live-badge {
    background: var(--ce-live-red);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    animation: ce-pulse 2s infinite;
}
.ce-live-title { font-size: 20px; font-weight: 700; color: var(--ce-dark); }
.ce-viewer-count { font-size: 13px; color: #666; margin-left: auto; }

@keyframes ce-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(220,53,69,.5); }
    70%  { box-shadow: 0 0 0 10px rgba(220,53,69,0); }
    100% { box-shadow: 0 0 0 0 rgba(220,53,69,0); }
}

/* ── Layout ── */
.ce-livestream-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.ce-livestream-layout.has-chat {
    grid-template-columns: 1fr 340px;
}

/* ── Video Container ── */
.ce-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 10px;
}
.ce-video-iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* ── Live Chat ── */
.ce-livestream-chat {
    height: 500px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0ddd6;
}
.ce-chat-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Stream Info ── */
.ce-livestream-info {
    margin-top: 16px;
    padding: 16px;
    background: #f8f7f4;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.7;
}

/* ── Offline State ── */
.ce-livestream-offline-wrap {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px;
}
.ce-offline-content {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    margin-bottom: 40px;
}
.ce-offline-icon { font-size: 64px; margin-bottom: 20px; }
.ce-offline-content h2 { font-size: 28px; margin: 0 0 12px; color: var(--ce-dark); }
.ce-offline-content p  { font-size: 16px; color: #555; margin: 0 0 24px; }

/* ── Next Service ── */
.ce-next-service { margin: 24px 0; }
.ce-next-service p { font-size: 13px; color: #888; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.ce-next-time { font-size: 20px; font-weight: 700; color: var(--ce-dark); margin-bottom: 12px; }
.ce-countdown {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    color: #666;
}
.ce-countdown span {
    background: var(--ce-dark);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
}

/* ── Offline Action Buttons ── */
.ce-offline-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}
.ce-btn-stream {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.ce-btn-stream.youtube  { background: #FF0000; color: #fff; }
.ce-btn-stream.facebook { background: #1877F2; color: #fff; }
.ce-btn-stream.sermons  { background: var(--ce-primary); color: #fff; }
.ce-btn-stream:hover    { opacity: .85; transform: translateY(-2px); }

/* ── Past Streams ── */
.ce-past-streams { text-align: left; }
.ce-past-streams h3 { font-size: 20px; margin-bottom: 16px; }
.ce-past-streams-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.ce-past-stream-card {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--ce-dark);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: all .15s;
}
.ce-past-stream-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.ce-past-stream-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.ce-sermon-thumb-placeholder { background: var(--ce-dark); color: #fff; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.ce-past-stream-title { padding: 10px; font-size: 13px; font-weight: 600; line-height: 1.4; }

/* ── Offline small state ── */
.ce-livestream-offline {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 60px 40px;
    text-align: center;
    color: #fff;
}
.ce-livestream-offline .ce-offline-icon { font-size: 48px; }
.ce-livestream-offline h3 { margin: 16px 0 8px; }
.ce-livestream-offline p  { color: #aaa; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .ce-livestream-layout.has-chat { grid-template-columns: 1fr; }
    .ce-livestream-chat { height: 400px; }
    .ce-past-streams-grid { grid-template-columns: 1fr 1fr; }
    .ce-countdown { gap: 8px; }
    .ce-countdown span { padding: 6px 10px; font-size: 14px; }
}
@media (max-width: 600px) {
    .ce-offline-content { padding: 30px 20px; }
    .ce-past-streams-grid { grid-template-columns: 1fr; }
    .ce-offline-actions { flex-direction: column; }
    .ce-btn-stream { justify-content: center; }
}
