/**
 * Styles for JW Player Scheduled Livestreams plugin
 */

/* Main container */
.jwplayer-scheduled-streams {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Table styles */
.jwplayer-schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.jwplayer-schedule-table th,
.jwplayer-schedule-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.jwplayer-schedule-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.jwplayer-schedule-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.jwplayer-schedule-table tr:hover {
    background-color: #f1f1f1;
}

/* Empty message styles */
.jwplayer-scheduled-streams-empty {
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

/* Title styles */
.jwplayer-scheduled-streams h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Admin table styles */
.jwplayer-scheduled-admin {
    margin-top: 20px;
}

.jwplayer-scheduled-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.jwplayer-scheduled-table th,
.jwplayer-scheduled-table td {
    padding: 12px 15px;
    text-align: left;
}

.jwplayer-scheduled-table th {
    background-color: #f1f1f1;
    font-weight: bold;
}

.jwplayer-scheduled-table .remove-stream {
    margin-right: 10px;
}

.jwplayer-scheduled-table .spinner {
    vertical-align: middle;
}

/* Notice styles */
.jwplayer-scheduled-admin .notice {
    margin: 10px 0 20px;
}
.jwplayer-scheduled-streams h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 1.5em;
    color: #333;
}

/* Live stream row highlight */
.jwplayer-stream-live {
    background-color: #fff8e6 !important;
    border-left: 4px solid #ff0000;
}

.jwplayer-stream-live:hover {
    background-color: #fff3d0 !important;
}

/* Live badge */
.jwplayer-live-badge {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Clickable stream title */
.jwplayer-stream-play {
    color: #0073aa;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.jwplayer-stream-live .jwplayer-stream-play {
    color: #d00;
    font-weight: 600;
}

.jwplayer-stream-play:hover {
    color: #005177;
    text-decoration: underline;
}

.jwplayer-stream-live .jwplayer-stream-play:hover {
    color: #a00;
}

/* Modal styles */
.jwplayer-stream-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.jwplayer-stream-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.jwplayer-stream-modal-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.jwplayer-stream-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 5px;
    opacity: 0.8;
}

.jwplayer-stream-modal-close:hover {
    opacity: 1;
}

.jwplayer-stream-modal-title {
    padding: 15px 50px 15px 20px;
    background: #1a1a1a;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.jwplayer-stream-modal-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.jwplayer-stream-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive styles */
@media screen and (max-width: 600px) {
    .jwplayer-schedule-table th, 
    .jwplayer-schedule-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .jwplayer-schedule-table {
        display: block;
        overflow-x: auto;
    }
    
    .jwplayer-stream-modal-dialog {
        width: 95%;
    }
    
    .jwplayer-stream-modal-title {
        font-size: 14px;
        padding: 12px 40px 12px 15px;
    }
}
