/*
* 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: #000;
    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,
.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;
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem;
}

.livestream-loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.livestream-offline i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cc0000;
}

.livestream-offline p {
    font-weight: 700;
    font-size: 1.5rem;
}

.livestream-offline span {
    font-size: 1rem;
    font-weight: 400;
    color: #ccc;
    margin-top: 0.5rem;
}

.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;
        /* Takes up 3/4 of the space */
        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;
        /* Takes up 1/4 of the space */
    }
}

.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);
    /* Fallback color if var not set */
    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 {
        /* This replaces the old .livestream-container flex rule */
        flex: 3;
    }

    .livestream-container {
        /* Reset flex here since it's now inside main-col */
        flex: unset;
        width: 100%;
        height: 0;
        padding-top: 56.25%;
        /* Maintain Aspect Ratio */
    }
}