/* =======================================
   VIDEO REVIEW PAGE
   ======================================= */
.review-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-lg);
    min-height: calc(100vh - var(--header-height) - var(--space-xl) * 2);
}

/* ---- Video Section ---- */
.review-video {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.review-video__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.review-video__title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.review-video__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Video Container */
.video-container {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-container__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    color: var(--text-tertiary);
}

.video-container__placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.3;
}

/* Timecode Display Overlay */
.timecode-display {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.05em;
    user-select: none;
    z-index: 5;
}

.timecode-display--recording {
    color: #EF4444;
}

.timecode-display--recording::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: #EF4444;
    margin-right: var(--space-xs);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Video Controls */
.video-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.video-controls__progress {
    position: relative;
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: height var(--transition-fast);
}

.video-controls__progress:hover {
    height: 10px;
}

.video-controls__progress-fill {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: var(--radius-full);
    transition: width 100ms linear;
    position: relative;
}

.video-controls__progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: white;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.video-controls__progress:hover .video-controls__progress-handle {
    opacity: 1;
}

/* Timecode Markers on Progress Bar */
.timecode-marker {
    position: absolute;
    top: -2px;
    width: 4px;
    height: calc(100% + 4px);
    background: var(--brand-cyan);
    border-radius: 2px;
    z-index: 2;
    cursor: pointer;
    opacity: 0.8;
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

.timecode-marker:hover {
    opacity: 1;
    transform: translateX(-50%) scaleX(1.5);
}

.timecode-marker__tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 2px var(--space-sm);
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--brand-cyan);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.timecode-marker:hover .timecode-marker__tooltip {
    opacity: 1;
}

.video-controls__bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.video-controls__left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.video-controls__center {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.video-controls__right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-left: auto;
}

.video-controls__time {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
}

.video-controls__play {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-gradient);
    color: white;
    transition: all var(--transition-fast);
}

.video-controls__play:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-glow-purple);
}

.video-controls__play svg {
    width: 20px;
    height: 20px;
}

/* Volume Control */
.video-controls__volume {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.video-controls__volume-slider {
    width: 80px;
    height: 4px;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
}

.video-controls__volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--text-primary);
    cursor: pointer;
}

/* Speed Control */
.video-controls__speed {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    padding: 2px var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.video-controls__speed:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* ---- Comments Panel ---- */
.comments-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: fit-content;
    max-height: calc(100vh - var(--header-height) - var(--space-xl) * 2);
}

.comments-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.comments-panel__title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.comments-panel__count {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.comments-panel__list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Individual Comment */
.comment {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    gap: var(--space-sm);
}

.comment:hover {
    background: var(--bg-tertiary);
}

.comment--active {
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.15);
}

.comment__avatar {
    flex-shrink: 0;
}

.comment__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.comment__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.comment__name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.comment__timecode {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    background: rgba(6, 182, 212, 0.1);
    color: var(--brand-cyan);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.comment__timecode:hover {
    background: rgba(6, 182, 212, 0.2);
}

.comment__timecode svg {
    width: 10px;
    height: 10px;
}

.comment__timestamp {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-left: auto;
}

.comment__text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.comment__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.comment:hover .comment__actions {
    opacity: 1;
}

.comment__action {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.comment__action:hover {
    color: var(--text-primary);
}

/* Comment Input (sticky bottom) */
.comment-input {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.comment-input__timecode-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    background: rgba(6, 182, 212, 0.1);
    color: var(--brand-cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.comment-input__timecode-chip svg {
    width: 10px;
    height: 10px;
}

.comment-input__row {
    display: flex;
    align-items: flex-end;
    gap: var(--space-sm);
}

.comment-input__field {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-primary);
    resize: none;
    min-height: 38px;
    max-height: 120px;
    line-height: 1.5;
    transition: border-color var(--transition-fast);
}

.comment-input__field:focus {
    outline: none;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.comment-input__field::placeholder {
    color: var(--text-tertiary);
}

.comment-input__send {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-cyan);
    color: white;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.comment-input__send:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-glow-cyan);
}

.comment-input__send:disabled {
    opacity: 0.4;
    pointer-events: none;
}

.comment-input__send svg {
    width: 16px;
    height: 16px;
}

/* ---- Annotations Mode ---- */
.review-video--annotating .video-container {
    cursor: crosshair;
}

.annotation-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--brand-cyan);
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.annotation-marker:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .review-layout {
        grid-template-columns: 1fr 340px;
    }
}

@media (max-width: 1024px) {
    .review-layout {
        grid-template-columns: 1fr;
    }

    .comments-panel {
        max-height: 400px;
    }
}

@media (max-width: 640px) {
    .video-controls__bar {
        flex-wrap: wrap;
    }

    .video-controls__volume-slider {
        width: 60px;
    }

    .comment-input__timecode-chip {
        font-size: 10px;
    }
}
