/* ═══════════════════════════════════════════════════
   Pinterest Video Downloader — WP Plugin Styles
   Matches the purple UI design from reference image
═══════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────── */
.pvd-wrap {
    --pvd-purple:       #7c3aed;
    --pvd-purple-dark:  #5b21b6;
    --pvd-purple-light: #8b5cf6;
    --pvd-purple-bg:    #f5f3ff;
    --pvd-white:        #ffffff;
    --pvd-gray:         #6b7280;
    --pvd-gray-light:   #f9fafb;
    --pvd-border:       #e5e7eb;
    --pvd-text:         #111827;
    --pvd-radius:       14px;
    --pvd-radius-sm:    8px;
    --pvd-shadow:       0 20px 60px rgba(124,58,237,.18);

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--pvd-text);
    box-sizing: border-box;
}
.pvd-wrap *, .pvd-wrap *::before, .pvd-wrap *::after {
    box-sizing: inherit;
}

/* ── Hero ──────────────────────────────────────── */
.pvd-hero {
    background: linear-gradient(135deg, var(--pvd-purple) 0%, #4f46e5 100%);
    border-radius: var(--pvd-radius);
    padding: 56px 24px 68px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.pvd-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 20%, rgba(255,255,255,.08) 0%, transparent 60%);
    pointer-events: none;
}
.pvd-hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }

/* Logo */
.pvd-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50px;
    padding: 6px 18px 6px 6px;
    margin-bottom: 24px;
}
.pvd-logo-icon { width: 30px; height: 30px; flex-shrink: 0; }
.pvd-logo-text  { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.3px; }

/* Title */
.pvd-hero-title {
    color: #fff;
    font-size: clamp(26px, 5vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 14px;
    letter-spacing: -.5px;
}
.pvd-hero-sub {
    color: rgba(255,255,255,.8);
    font-size: 16px;
    margin: 0 0 36px;
    line-height: 1.5;
}

/* ── Search bar — exact match to image ─────────── */
.pvd-bar-wrap { max-width: 640px; margin: 0 auto; }

.pvd-bar {
    display: flex;
    align-items: center;
    background: var(--pvd-white);
    border-radius: 50px;
    padding: 5px 5px 5px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    gap: 6px;
}

.pvd-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: #374151;
    font-family: inherit;
    padding: 6px 0;
    min-width: 0;
}
.pvd-input::placeholder { color: #9ca3af; }

/* Paste button — purple filled, rounded */
.pvd-paste-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--pvd-purple);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .15s, transform .1s;
    flex-shrink: 0;
}
.pvd-paste-btn:hover  { background: var(--pvd-purple-dark); }
.pvd-paste-btn:active { transform: scale(.97); }
.pvd-paste-btn svg    { flex-shrink: 0; }

/* Download button — white filled, rounded */
.pvd-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--pvd-white);
    color: var(--pvd-purple);
    border: 2px solid var(--pvd-purple);
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .15s, color .15s, transform .1s;
    flex-shrink: 0;
}
.pvd-dl-btn:hover  { background: var(--pvd-purple); color: #fff; }
.pvd-dl-btn:active { transform: scale(.97); }
.pvd-dl-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.pvd-btn-icon, .pvd-btn-spinner { display: flex; align-items: center; }
.pvd-spin { animation: pvd-spin .8s linear infinite; }
@keyframes pvd-spin { to { transform: rotate(360deg); } }

/* Error */
.pvd-error {
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.3);
    color: #fca5a5;
    border-radius: var(--pvd-radius-sm);
    padding: 10px 16px;
    margin-top: 14px;
    font-size: 13px;
    text-align: left;
}

/* ── Result card ───────────────────────────────── */
.pvd-result-wrap {
    margin-top: 28px;
}

.pvd-card {
    background: var(--pvd-white);
    border-radius: var(--pvd-radius);
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--pvd-border);
    animation: pvd-fadeup .35s ease both;
}
@keyframes pvd-fadeup {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
}

.pvd-card-preview {
    flex: 0 0 100%;
    max-height: 340px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
@media (min-width: 600px) {
    .pvd-card-preview { flex: 0 0 40%; max-height: none; }
    .pvd-card-body    { flex: 1; }
}
.pvd-card-preview img,
.pvd-card-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pvd-card-body {
    flex: 1;
    padding: 28px;
}

.pvd-badge {
    display: inline-block;
    background: var(--pvd-purple);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    border-radius: 50px;
    padding: 4px 14px;
    margin-bottom: 12px;
}

.pvd-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pvd-text);
    margin: 0 0 24px;
    line-height: 1.4;
}

.pvd-actions { display: flex; flex-direction: column; gap: 10px; }

.pvd-action-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--pvd-purple);
    color: #fff !important;
    text-decoration: none;
    border-radius: 50px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    transition: background .15s, transform .1s;
}
.pvd-action-main:hover  { background: var(--pvd-purple-dark); transform: translateY(-1px); }
.pvd-action-main:active { transform: scale(.98); }

.pvd-action-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1.5px solid var(--pvd-border);
    color: var(--pvd-gray) !important;
    text-decoration: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    transition: border-color .15s, color .15s;
}
.pvd-action-ghost:hover { border-color: var(--pvd-purple); color: var(--pvd-purple) !important; }

/* ── How-to steps ──────────────────────────────── */
.pvd-steps {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    margin-top: 36px;
    background: var(--pvd-white);
    border: 1px solid var(--pvd-border);
    border-radius: var(--pvd-radius);
    overflow: hidden;
}
.pvd-step {
    flex: 1;
    min-width: 180px;
    padding: 28px 24px;
    text-align: center;
    border-right: 1px solid var(--pvd-border);
}
.pvd-step:last-child { border-right: none; }
.pvd-step-icon {
    width: 52px;
    height: 52px;
    background: var(--pvd-purple-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--pvd-purple);
}
.pvd-step h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--pvd-text);
    margin: 0 0 6px;
}
.pvd-step p {
    font-size: 13px;
    color: var(--pvd-gray);
    margin: 0;
    line-height: 1.5;
}

/* ── Disclaimer ────────────────────────────────── */
.pvd-disclaimer {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 20px;
    padding: 0;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 520px) {
    .pvd-hero { padding: 40px 16px 52px; }
    .pvd-bar  { padding: 4px 4px 4px 16px; gap: 4px; }
    .pvd-paste-btn { padding: 9px 14px; font-size: 13px; }
    .pvd-dl-btn    { padding: 9px 16px; font-size: 13px; }
    .pvd-input     { font-size: 14px; }
    .pvd-steps     { flex-direction: column; }
    .pvd-step      { border-right: none; border-bottom: 1px solid var(--pvd-border); }
    .pvd-step:last-child { border-bottom: none; }
}
