/**
 * FILE: assets/css/amum-modal-video.css
 * Complete styling with social features and payments
 */

/* ===== Body Lock ===== */
body.amum-modal-open {
    overflow: hidden !important;
}

/* NOTE: .amum-modal, .amum-modal-close, .amum-modal-container and
   .amum-video-player are intentionally NOT redefined here anymore —
   platform.css already styles all of these with a proper responsive
   layout (mobile bottom-sheet, desktop side-panel, scrollable info
   column). This file previously duplicated those same selectors with
   older, non-responsive rules; since this stylesheet loads after
   platform.css, it was silently winning the cascade and breaking the
   responsive/scrollable behavior on desktop. Everything below this
   point is the additional payment/social/comment styling that's
   unique to this file and still needed. */

.amum-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.2rem;
}

/* ===== In-player controls: Previous / Play / Next =====
   Built into #amum-video-player alongside the <video> element itself
   by amum-modal-video.js (that element's innerHTML is fully replaced
   each time a video loads, so these can't be static markup — they're
   inserted fresh with the video every time). Reuses the same
   .amum-prev-video-btn/.amum-next-video-btn classes as the Previous/
   Next buttons already in the info panel, so the existing delegated
   click handlers and disabled-state syncing in amum-modal-video.js
   apply to these automatically — no duplicate logic needed. */
.amum-player-controls {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: transparent;
    opacity: 1;
    transition: opacity .35s ease;
    pointer-events: none; /* only the buttons themselves are clickable */
}
.amum-player-controls.amum-controls-faded { opacity: 0; }
/* Reappear on hover (desktop/mouse) or while paused, even if faded */
.amum-video-player:hover .amum-player-controls,
.amum-player-controls:not(.amum-controls-playing) { opacity: 1; }

.amum-player-ctrl-btn {
    pointer-events: auto;
    background: transparent;      /* transparent by default, as requested */
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 20px;
    line-height: 1;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,.85)); /* keeps icons visible over bright frames without a background fill */
    transition: background-color .2s ease, transform .15s ease;
}
.amum-player-ctrl-btn:hover,
.amum-player-ctrl-btn:focus-visible { background: rgba(0,0,0,.35); }
.amum-player-ctrl-btn:active { transform: scale(.92); }
.amum-player-ctrl-btn[disabled] { opacity: .35; cursor: default; }
.amum-player-ctrl-btn[disabled]:hover { background: transparent; }

.amum-play-pause-btn { width: 64px; height: 64px; font-size: 28px; }

/* Larger, more thumb-friendly on phones — this cluster is the primary
   playback control on touch devices. */
@media (max-width: 480px) {
    .amum-player-controls { gap: 28px; }
    .amum-player-ctrl-btn { width: 52px; height: 52px; font-size: 22px; }
    .amum-play-pause-btn { width: 68px; height: 68px; font-size: 30px; }
}

/* ===== Payment Gate ===== */
#amum-payment-gate {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.amum-payment-info {
    text-align: center;
    padding: 40px;
    color: #fff;
}

.amum-payment-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.amum-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 30px;
}

.amum-payment-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.amum-pay-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.amum-pay-mpesa {
    background: #00A86B;
    color: #fff;
}

.amum-pay-mpesa:hover {
    background: #008C59;
    transform: translateY(-2px);
}

.amum-pay-paypal {
    background: #0070BA;
    color: #fff;
}

.amum-pay-paypal:hover {
    background: #005A95;
    transform: translateY(-2px);
}

.amum-login-prompt {
    margin-top: 20px;
    color: #aaa;
}

.amum-login-prompt a {
    color: #4CAF50;
    text-decoration: underline;
}

/* ===== Video Info Section ===== */
.amum-video-info {
    padding: 25px;
    background: #1a1a1a;
    color: #fff;
}

.amum-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.amum-video-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.amum-video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
    color: #aaa;
}

.amum-video-meta span {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

/* ===== Action Buttons (Back, Home, Download) ===== */
.amum-action-buttons {
    display: flex;
    gap: 10px;
}

.amum-btn-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
}

.amum-btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.amum-btn-back:hover {
    background: #2196F3;
}

.amum-btn-home:hover {
    background: #4CAF50;
}

.amum-btn-download:hover {
    background: #FF9800;
}

/* ===== Social Actions ===== */
.amum-social-actions {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.amum-social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.amum-social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.amum-like-btn.liked {
    background: #e74c3c;
    border-color: #e74c3c;
}

.amum-like-btn.liked .amum-icon-heart {
    animation: heartBeat 0.3s;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

.amum-subscribe-btn.subscribed {
    background: #4CAF50;
    border-color: #4CAF50;
}

/* ===== Comments Section ===== */
.amum-comments-section {
    margin-top: 25px;
}

.amum-comments-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.amum-comment-form {
    margin-bottom: 20px;
}

#amum-comment-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    resize: vertical;
    margin-bottom: 10px;
}

#amum-comment-input:focus {
    outline: none;
    border-color: #4CAF50;
    background: rgba(255, 255, 255, 0.08);
}

.amum-btn-primary {
    padding: 10px 25px;
    background: #4CAF50;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.amum-btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.amum-comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.amum-comment-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 10px;
}

.amum-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.amum-comment-content {
    flex: 1;
}

.amum-comment-author {
    font-weight: 600;
    margin-bottom: 5px;
}

.amum-comment-time {
    font-size: 0.8rem;
    color: #888;
    margin-left: 10px;
}

.amum-comment-text {
    color: #ddd;
    line-height: 1.5;
}

/* ===== Play Button on Thumbnails ===== */
.amum-video-thumbnail-wrapper {
    position: relative;
    display: block;
}

.amum-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    opacity: 0.9;
    transition: all 0.3s;
}

.amum-video-thumbnail-wrapper:hover .amum-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.amum-play-overlay svg {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .amum-modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .amum-info-header {
        flex-direction: column;
    }

    .amum-video-title {
        font-size: 1.4rem;
    }

    .amum-social-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .amum-social-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 140px;
        justify-content: center;
    }

    .amum-payment-buttons {
        flex-direction: column;
    }

    .amum-pay-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Scrollbar Styling ===== */
.amum-modal-container::-webkit-scrollbar,
.amum-comments-list::-webkit-scrollbar {
    width: 8px;
}

.amum-modal-container::-webkit-scrollbar-track,
.amum-comments-list::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.amum-modal-container::-webkit-scrollbar-thumb,
.amum-comments-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.amum-modal-container::-webkit-scrollbar-thumb:hover,
.amum-comments-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}