/* ============================================================
   Download Timer Popup — style.css  v2.4
   Auth panel matches site login page: purple bg, yellow buttons
   ============================================================ */

#dtp-overlay *,
#dtp-overlay *::before,
#dtp-overlay *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Overlay backdrop ─────────────────────────────────────── */
#dtp-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(20, 6, 50, 0.88);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999 !important;
    padding: 20px;
    animation: dtp-fade-in 0.22s ease forwards;
}

#dtp-overlay.dtp-open {
    display: flex !important;
}

@keyframes dtp-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Popup card ───────────────────────────────────────────── */
#dtp-popup {
    position: relative;
    border-radius: 20px;
    width: 96vw;
    max-width: 1060px;
    min-height: 500px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    overflow: hidden;
    animation: dtp-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    background: #ffffff;
}

@keyframes dtp-slide-up {
    from { transform: translateY(28px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ── Close ✕ button ───────────────────────────────────────── */
#dtp-close-x {
    position: absolute;
    top: 16px;
    right: 18px;
    background: rgba(255,255,255,0.15);
    border: none;
    font-size: 15px;
    color: #ffffff;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
    z-index: 10;
}

#dtp-close-x:hover {
    background: rgba(255,255,255,0.25);
}

/* ══════════════════════════════════════════════════════════
   LEFT COLUMN — Ad Section (white bg)
══════════════════════════════════════════════════════════ */
#dtp-ad-column {
    flex: 1;
    background: #f5f3ff;
    border-right: 1px solid #ede9fe;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 36px;
    gap: 16px;
}

#dtp-ad-label {
    font-size: 10px;
    font-weight: 700;
    color: #a89fd4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

.dtp-ad-box {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dtp-ad-placeholder {
    border: 1.5px dashed #c9c3f0;
    background: #ffffff;
    color: #9ca3af;
    font-size: 0.85rem;
    width: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    padding: 24px;
}

.dtp-ad-placeholder span {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   RIGHT COLUMN — Auth Gate (purple background like login page)
══════════════════════════════════════════════════════════ */
#dtp-auth-column {
    flex: 1.1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 52px 48px;
    text-align: left;
    background: #4a1d8a;
}

/* Heading — large bold white like site login */
#dtp-auth-heading {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Subtext — white, slightly muted */
#dtp-auth-subtext {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
    margin: 0 0 36px;
    line-height: 1.65;
    max-width: 340px;
}

/* ── Auth buttons ─────────────────────────────────────────── */
.dtp-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    transition: filter 0.15s, transform 0.12s;
    letter-spacing: 0.01em;
    cursor: pointer;
    padding: 16px 24px;
}

.dtp-auth-btn:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    text-decoration: none;
}

.dtp-auth-btn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

/* Primary — yellow solid fill (same as site Login button) */
.dtp-auth-btn--primary {
    background: #f5c518;
    color: #1a0535;
    margin-bottom: 14px;
    border: 2px solid #f5c518;
}

.dtp-auth-btn--primary:hover {
    color: #1a0535;
}

/* Secondary — yellow outline only (same as site Register button) */
.dtp-auth-btn--secondary {
    background: transparent;
    color: #f5c518;
    border: 2px solid #f5c518;
    margin-bottom: 28px;
}

.dtp-auth-btn--secondary:hover {
    color: #f5c518;
    background: rgba(245, 197, 24, 0.08);
}

.dtp-auth-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dtp-auth-btn--primary svg { stroke: #1a0535; }
.dtp-auth-btn--secondary svg { stroke: #f5c518; }

/* ── Divider ──────────────────────────────────────────────── */
.dtp-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 18px;
}

.dtp-auth-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.2);
}

.dtp-auth-divider-text {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    font-weight: 500;
}

/* ── Auth note link ───────────────────────────────────────── */
.dtp-auth-note {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
    text-align: center;
    width: 100%;
}

.dtp-auth-note a {
    color: #f5c518;
    font-weight: 700;
    text-decoration: none;
}

.dtp-auth-note a:hover {
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════
   RIGHT COLUMN — Timer & Download (white bg)
══════════════════════════════════════════════════════════ */
#dtp-timer-column {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 52px 48px;
    text-align: center;
    background: #ffffff;
}

/* ── Timer icon badge ─────────────────────────────────────── */
#dtp-timer-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: #4a1d8a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    flex-shrink: 0;
}

#dtp-timer-icon svg {
    width: 32px;
    height: 32px;
    stroke: #ffffff;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Heading ──────────────────────────────────────────────── */
#dtp-heading {
    font-size: 1.55rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 10px;
    line-height: 1.25;
}

/* ── Subtext ──────────────────────────────────────────────── */
#dtp-subtext {
    font-size: 0.92rem;
    color: #6b7280;
    margin: 0 0 32px;
    line-height: 1.65;
    max-width: 300px;
}

/* ── Progress bar ─────────────────────────────────────────── */
.dtp-progress-wrap {
    width: 100%;
    height: 8px;
    background: #ede9fe;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 18px;
}

#dtp-progress-bar {
    height: 100%;
    width: 100%;
    background: #4a1d8a;
    border-radius: 99px;
    transition: width 1s linear;
}

/* ── Timer text ───────────────────────────────────────────── */
#dtp-timer-text {
    font-size: 1.05rem;
    color: #4b5563;
    margin-bottom: 28px;
    min-height: 1.5em;
    transition: color 0.3s;
}

#dtp-countdown {
    font-weight: 800;
    color: #4a1d8a;
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    min-width: 1.5ch;
}

/* ── Download button — yellow solid pill (matches Login btn) ─ */
#dtp-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 17px 28px;
    background: #f5c518;
    color: #1a0535;
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #f5c518;
    letter-spacing: 0.01em;
    transition: filter 0.15s, transform 0.1s;
    margin-bottom: 14px;
    animation: dtp-pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#dtp-download-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    color: #1a0535;
    text-decoration: none;
}

#dtp-download-btn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

#dtp-download-btn svg {
    width: 18px;
    height: 18px;
    stroke: #1a0535;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes dtp-pop-in {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Close button — outline pill ─────────────────────────── */
#dtp-close-btn {
    display: block;
    width: 100%;
    padding: 13px 24px;
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.92rem;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
    font-weight: 600;
}

#dtp-close-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 680px) {
    #dtp-popup {
        flex-direction: column;
        max-width: 100%;
        min-height: unset;
        border-radius: 16px;
    }

    #dtp-ad-column {
        border-right: none;
        border-bottom: 1px solid #ede9fe;
        padding: 28px 24px;
    }

    .dtp-ad-placeholder { min-height: 140px; }

    #dtp-auth-column {
        padding: 36px 28px 32px;
        align-items: center;
        text-align: center;
    }

    #dtp-auth-subtext { max-width: 100%; }

    #dtp-timer-column { padding: 36px 28px 32px; }

    #dtp-heading,
    #dtp-auth-heading { font-size: 1.4rem; }

    #dtp-close-x {
        background: rgba(0,0,0,0.15);
        color: #111827;
    }
}