/* ============================================================
   Cinemax — download.css
   Download button styles
   ============================================================ */

/* ── Download Box ─────────────────────────────────────────────
   Container for all quality download links on a movie/episode
   ============================================================ */
.cx-dl-box {
    background: var(--cx-surface-2);
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius-lg);
    overflow: hidden;
}
.cx-dl-box__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--cx-surface-3);
    border-bottom: 1px solid var(--cx-border);
    font-size: 15px;
    font-weight: 600;
}
.cx-dl-box__header svg { width: 20px; height: 20px; color: var(--cx-accent); }

.cx-dl-box__notice {
    padding: 14px 20px;
    background: rgba(99,102,241,.06);
    border-bottom: 1px solid var(--cx-border);
    font-size: 13px;
    color: var(--cx-text-muted);
    line-height: 1.6;
}

.cx-dl-box__groups {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Quality group */
.cx-dl-group { }
.cx-dl-group__label {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.cx-dl-group__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Download Button */
.cx-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--cx-radius);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 200ms ease, box-shadow 200ms ease, opacity 200ms ease, filter 200ms ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    border: none;
    color: #fff;
}
.cx-dl-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 60%);
    pointer-events: none;
}
.cx-dl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    color: #fff;
}
.cx-dl-btn:active { transform: translateY(0) scale(.98); }

.cx-dl-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.cx-dl-btn__server { font-weight: 700; }
.cx-dl-btn__size {
    font-size: 12px;
    font-weight: 400;
    opacity: .85;
    margin-left: auto;
    white-space: nowrap;
}

.cx-dl-btn--full { width: 100%; min-width: unset; }

/* Quality-specific button colors */
.cx-dl-btn.quality--4k   { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.cx-dl-btn.quality--1080 { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.cx-dl-btn.quality--720  { background: linear-gradient(135deg, #065f46, #10b981); }
.cx-dl-btn.quality--480  { background: linear-gradient(135deg, #92400e, #f59e0b); }
.cx-dl-btn.quality--360  { background: linear-gradient(135deg, #374151, #6b7280); }
.cx-dl-btn.quality--std  { background: linear-gradient(135deg, #374151, #6b7280); }
.cx-dl-btn.quality--hd   { background: linear-gradient(135deg, #0c4a6e, #0284c7); }

/* Small download buttons (episode row) */
.cx-dl-btn--small {
    min-width: unset;
    padding: 6px 12px;
    font-size: 12px;
    width: auto;
}
.cx-dl-btn--small svg { width: 14px; height: 14px; }

.cx-dl-btn--info {
    background: var(--cx-surface-3);
    border: 1px solid var(--cx-border);
    color: var(--cx-text-muted);
    font-size: 12px;
    padding: 6px 12px;
    min-width: unset;
}
.cx-dl-btn--info:hover { border-color: var(--cx-border-light); color: var(--cx-text); }

/* Quality group label colors */
.cx-dl-group__label.quality--4k   { background: rgba(124,58,237,.2);  color: #c4b5fd; }
.cx-dl-group__label.quality--1080 { background: rgba(29,78,216,.2);   color: #93c5fd; }
.cx-dl-group__label.quality--720  { background: rgba(6,95,70,.2);     color: #6ee7b7; }
.cx-dl-group__label.quality--480  { background: rgba(146,64,14,.2);   color: #fcd34d; }
.cx-dl-group__label.quality--360  { background: rgba(55,65,81,.3);    color: #9ca3af; }
.cx-dl-group__label.quality--std  { background: rgba(55,65,81,.3);    color: #9ca3af; }
.cx-dl-group__label.quality--hd   { background: rgba(12,74,110,.2);   color: #7dd3fc; }

/* Download disclaimer */
.cx-dl-box__disclaimer {
    padding: 14px 20px;
    border-top: 1px solid var(--cx-border);
    font-size: 12px;
    color: var(--cx-text-dim);
    background: var(--cx-surface);
    line-height: 1.6;
}

/* ── Download animation ───────────────────────────────────────
   Pulse on hover to draw attention to download buttons
   ============================================================ */
@keyframes cx-dl-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.4); }
    50%       { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}
