/**
 * Feminism Magazine - Video Player V2 CSS
 * Enhanced controls, Speed control, Picture-in-picture, End screen
 * Version: 2.0.0
 */

/* ==============================================
   VIDEO CONTAINER V2
   ============================================== */
.fem-video--v2 {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
}

.fem-video--v2 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==============================================
   PLAY BUTTON ENHANCEMENT
   ============================================== */
.fem-video--v2 .fem-video__play {
    position: relative;
    background: rgba(212, 72, 109, 0.9);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: fem-pulse 2s infinite;
}

.fem-video--v2 .fem-video__play:hover {
    transform: scale(1.15);
    background: rgba(212, 72, 109, 1);
}

.fem-video--v2 .fem-video__play::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(212, 72, 109, 0.4);
    transform: translate(-50%, -50%);
    animation: fem-ripple 2s infinite;
}

@keyframes fem-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 72, 109, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(212, 72, 109, 0); }
}

@keyframes fem-ripple {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* ==============================================
   CONTROLS OVERLAY
   ============================================== */
.fem-video__controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 3rem 1rem 1rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fem-video--v2:hover .fem-video__controls-overlay,
.fem-video--v2:focus-within .fem-video__controls-overlay {
    opacity: 1;
}

.fem-video__controls-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Control buttons */
.fem-video__ctrl {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fem-video__ctrl:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.fem-video__ctrl-play {
    width: 40px;
    height: 40px;
    background: #D4486D;
}

.fem-video__ctrl-play:hover {
    background: #B83A5A;
}

.fem-video__ctrl-play .pause-icon {
    display: none;
}

.fem-video__ctrl-play.playing .play-icon {
    display: none;
}

.fem-video__ctrl-play.playing .pause-icon {
    display: block;
}

/* Progress bar */
.fem-video__ctrl-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.fem-video__ctrl-progress-bar {
    height: 100%;
    background: #D4486D;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.fem-video__ctrl-time {
    color: #fff;
    font-size: 0.75rem;
    min-width: 70px;
    text-align: center;
}

/* ==============================================
   SPEED CONTROL
   ============================================== */
.fem-video__ctrl-speed {
    position: relative;
}

.fem-video__ctrl-speed-btn {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fem-video__ctrl-speed-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fem-video__ctrl-speed-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1a1a1a;
    border-radius: 8px;
    padding: 0.5rem;
    display: none;
    min-width: 80px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fem-video__ctrl-speed-menu.active {
    display: block;
}

.fem-video__ctrl-speed-menu button {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    text-align: center;
    transition: all 0.2s ease;
}

.fem-video__ctrl-speed-menu button:hover,
.fem-video__ctrl-speed-menu button.active {
    background: #D4486D;
}

/* ==============================================
   PICTURE-IN-PICTURE
   ============================================== */
.fem-pip-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 320px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.fem-pip-container.active {
    transform: translateX(0);
}

.fem-pip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #2a2a2a;
    cursor: move;
}

.fem-pip-title {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
}

.fem-pip-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.fem-pip-close:hover {
    opacity: 1;
}

.fem-pip-content {
    position: relative;
    padding-bottom: 56.25%;
}

.fem-pip-content iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==============================================
   END SCREEN
   ============================================== */
.fem-video__endscreen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.fem-video__endscreen-content {
    text-align: center;
    color: #fff;
    padding: 2rem;
}

.fem-video__endscreen-content h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.fem-video__related {
    margin-bottom: 1.5rem;
}

.fem-video__related-title {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.fem-video__related-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #D4486D;
    color: #fff;
    text-decoration: none;
    border-radius: 99px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.fem-video__related-item:hover {
    background: #B83A5A;
    transform: translateY(-2px);
}

.fem-video__replay {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 99px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fem-video__replay:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==============================================
   SPINNER
   ============================================== */
.fem-video__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.fem-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #D4486D;
    border-radius: 50%;
    animation: fem-spin 1s linear infinite;
}

@keyframes fem-spin {
    to { transform: rotate(360deg); }
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
    .fem-video--v2 .fem-video__play {
        width: 60px;
        height: 60px;
    }
    
    .fem-pip-container {
        width: 280px;
        bottom: 80px;
        right: 10px;
    }
}
