/*
* Styles for the Livestream Page (live.php)
*/

.livestream-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.livestream-container {
    position: relative;
    width: 100%;
    /* 16:9 Aspect Ratio */
    padding-top: 56.25%;
    background-color: #111;
    /* Darker background for cinema feel */
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.livestream-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.livestream-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem;
}

/* --- UPDATED OFFLINE STATE --- */
.livestream-offline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    text-align: center;
    padding: 2rem;
}

.offline-content {
    max-width: 400px;
}

.livestream-offline i.pulse-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--color-secondary, #f6bc3f);
    opacity: 0.8;
}

.livestream-offline h2 {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

.livestream-offline p {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ddd;
    margin-bottom: 0.5rem;
}

.livestream-offline span {
    display: block;
    font-size: 0.95rem;
    font-weight: 400;
    color: #aaa;
    margin-bottom: 2rem;
}

/* Offline Action Button */
.offline-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary, #1a472a);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.offline-btn:hover {
    background-color: transparent;
    border-color: var(--color-primary, #1a472a);
    color: var(--color-primary, #1a472a);
    /* Assuming background behind is light, but here inside container it might need tweak. */
    background-color: #fff;
    color: #000;
    transform: translateY(-2px);
}

.livestream-info {
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.livestream-info-title {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.livestream-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-dark);
    margin: 0;
}

/* Responsive */
@media (min-width: 992px) {
    .livestream-wrapper {
        flex-direction: row;
    }

    .livestream-container {
        flex: 3;
        padding-top: 0;
        /* Override aspect ratio, let height be set by flex partner */
        height: 600px;
        /* Set a fixed height for large screens */
    }

    .livestream-info {
        flex: 1;
    }
}

.livestream-main-col {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Source Selector Styles */
.source-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    background: #f1f1f1;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.source-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
    margin-right: 5px;
}

.btn-source {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-source:hover {
    background-color: #e9e9e9;
    border-color: #bbb;
}

.btn-source.active {
    background-color: var(--color-primary, #004d40);
    color: #fff;
    border-color: var(--color-primary, #004d40);
}

/* Adjust Responsive Layout */
@media (min-width: 992px) {
    .livestream-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }

    .livestream-main-col {
        flex: 3;
    }

    .livestream-container {
        flex: unset;
        width: 100%;
        height: 0;
        padding-top: 56.25%;
        /* Maintain Aspect Ratio */
    }
}