/* =================================================================
   ArtPlayer × Dailymotion – Player Styles
   assets/css/player.css
================================================================= */

/* ── Wrapper ──────────────────────────────────────────────────── */
.apdm-player-wrap {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
    /* Default 16:9 aspect ratio (overridden when height is explicit) */
    aspect-ratio: 16 / 9;
}

/* ── ArtPlayer container fills the wrapper ───────────────────── */
.apdm-artplayer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.apdm-dm-layer { display: none; }

/* ── Direct iframe embed ─────────────────────────────────────── */
.apdm-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    z-index: 2;
}

/* ── Title bar ───────────────────────────────────────────────── */
.apdm-title-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(0,0,0,.7) 0%, transparent 100%);
    z-index: 30;
    pointer-events: none;
}

.apdm-title-text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .9);
    text-shadow: 0 1px 4px rgba(0,0,0,.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* ── Skip button ─────────────────────────────────────────────── */
.apdm-skip-btn {
    position: absolute;
    bottom: 80px;
    right: 16px;
    background: rgba(12, 12, 12, .88);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 100;
    display: none;
    transition: background .15s, border-color .15s, color .15s;
}

.apdm-skip-btn:hover,
.apdm-skip-btn:focus {
    background: #fff;
    color: #000;
    border-color: #fff;
    outline: none;
}

/* ── Resume dialog ───────────────────────────────────────────── */
.apdm-resume {
    position: absolute;
    bottom: 80px;
    left: 16px;
    background: rgba(10, 10, 10, .94);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(16px);
    border-radius: 10px;
    padding: 10px 14px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #f0f0f0;
    box-shadow: 0 8px 32px rgba(0,0,0,.6);
    animation: apdm-slide-up .3s ease;
}

@keyframes apdm-slide-up {
    from { transform: translateY(8px); opacity: 0; }
    to   { transform: none;           opacity: 1; }
}

.apdm-resume strong {
    font-family: 'DM Mono', 'Courier New', monospace;
    color: var(--apdm-theme, #e8384f);
}

.apdm-resume-jump {
    background: var(--apdm-theme, #e8384f);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 5px;
    transition: opacity .15s;
}

.apdm-resume-jump:hover { opacity: .85; }

.apdm-resume-close {
    cursor: pointer;
    color: rgba(240,240,240,.5);
    font-size: 16px;
    line-height: 1;
    transition: color .12s;
}

.apdm-resume-close:hover { color: var(--apdm-theme, #e8384f); }

/* ── Error message ───────────────────────────────────────────── */
.apdm-error {
    padding: 12px 16px;
    background: #1a0000;
    border: 1px solid #600;
    border-radius: 6px;
    color: #f88;
    font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    .apdm-skip-btn {
        bottom: 72px;
        right: 10px;
        font-size: 12px;
        padding: 7px 14px;
    }

    .apdm-resume {
        bottom: 72px;
        left: 10px;
        right: 10px;
        font-size: 12px;
    }

    .apdm-title-text {
        font-size: 12px;
    }
}
