/* =========================================
   LGN Practice Controls — Add-on Styles
   Injected beneath the Video.js/Nuevo player
   ========================================= */

/* --- Outer container to break out of flex context --- */
.lgn-pc-outer {
    display: block;
    width: 100%;
}

.lgn-pc-wrapper {
    background: #1a1a1a;
    padding: 12px 14px 14px;
    border-radius: 0 0 8px 8px;
    margin-top: -2px; /* snug up against the player */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e0e0e0;
    width: 100%;
    clear: both;
}

/* Rows */
.lgn-pc-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.lgn-pc-row:last-child {
    margin-bottom: 0;
}

/* Groups */
.lgn-pc-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Labels */
.lgn-pc-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-right: 4px;
    min-width: 48px;
}

/* Buttons */
.lgn-pc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
    min-height: 32px;
    user-select: none;
}

.lgn-pc-btn:hover {
    background: #3a3a3a;
    color: #fff;
}

.lgn-pc-btn.lgn-pc-active {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.lgn-pc-btn.lgn-pc-disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* Speed buttons container — desktop only */
.lgn-pc-speed-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Speed dropdown — mobile only */
.lgn-pc-speed-select {
    display: none;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    cursor: pointer;
    min-height: 32px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.lgn-pc-speed-select:focus {
    outline: none;
    border-color: #c0392b;
}

.lgn-pc-speed-select option {
    background: #2a2a2a;
    color: #e0e0e0;
}

/* Speed buttons */
.lgn-pc-speed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    min-height: 30px;
    user-select: none;
}

.lgn-pc-speed-btn:hover {
    background: #3a3a3a;
    color: #fff;
}

.lgn-pc-speed-btn.lgn-pc-active {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

/* Loop time displays */
.lgn-pc-loop-time {
    font-size: 13px;
    color: #999;
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Zoom level display */
.lgn-pc-zoom-level {
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
    min-width: 36px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Mirror group push right */
.lgn-pc-mirror-group {
    margin-left: auto;
}

/* Shortcuts hint */
.lgn-pc-shortcuts-hint {
    font-size: 11px;
    color: #555;
    padding-top: 4px;
    border-top: 1px solid #2a2a2a;
    margin-top: 4px;
}

.lgn-pc-shortcuts-hint strong {
    color: #777;
}

/* --- Zoom overflow hidden on the video container --- */
.lgn-video-main-wrapper {
    overflow: hidden;
}

/* Smooth transforms on the video element */
.lgn-video-wrapper video {
    transition: transform 0.15s ease;
    transform-origin: center center;
}

/* Grab cursor when zoomed */
.lgn-video-main-wrapper[style*="grab"] {
    cursor: grab;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .lgn-pc-wrapper {
        padding: 10px;
    }

    /* Hide desktop speed buttons, show dropdown */
    .lgn-pc-speed-buttons {
        display: none;
    }

    .lgn-pc-speed-select {
        display: block;
    }

    .lgn-pc-mirror-group {
        margin-left: 0;
    }

    .lgn-pc-shortcuts-hint {
        display: none;
    }
}
