/* «دانلود نرم افزار» (pd): the Android app card in the profile dialog — theme-aware through the --oa-* tokens */

.pd-root { display: block; }

.pd-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-radius: 22px;
    background: var(--oa-surface, #fff);
    border: 1px solid var(--oa-line, #dbe4f2);
}

.pd-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(120% 140% at 90% 0%, rgba(125, 211, 252, 0.35), transparent 55%),
        linear-gradient(150deg, #0b2a86, #1d4ed8 60%, #3b82f6);
    box-shadow: 0 18px 36px -22px rgba(29, 78, 216, 0.75);
}
html[data-bs-theme="dark"] .pd-hero,
body.theme-dark .pd-hero {
    background:
        radial-gradient(120% 140% at 90% 0%, rgba(96, 165, 250, 0.3), transparent 55%),
        linear-gradient(150deg, #07164f, #123a9c 60%, #2563eb);
}
.pd-logo { flex-shrink: 0; width: 58px; height: auto; filter: drop-shadow(0 10px 16px rgba(2, 8, 40, 0.45)); }
.pd-hero-text { min-width: 0; }
.pd-hero h4 { margin: 0 0 6px; font-size: 1.12rem; font-weight: 900; line-height: 1.7; color: #fff; }
.pd-hero p { margin: 0 0 12px; font-size: 0.84rem; line-height: 2; color: rgba(255, 255, 255, 0.86); }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.24); color: #fff; }
.pd-chip svg { width: 15px; height: 15px; }

.pd-banner { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 14px; font-size: 0.84rem; line-height: 1.9; }
.pd-banner svg { width: 19px; height: 19px; margin-top: 2px; flex-shrink: 0; }
.pd-banner.is-current { background: color-mix(in srgb, var(--oa-success, #16a34a) 12%, var(--oa-surface, #fff)); color: var(--oa-success, #16a34a); }
.pd-banner.is-update { background: var(--oa-brand-soft, rgba(37, 99, 235, 0.1)); color: var(--oa-brand, #2563eb); }

.pd-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; }
.pd-actions { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid var(--oa-line, #dbe4f2);
    background: var(--oa-surface-soft, #f5f8fd);
    color: var(--oa-ink, #0b1630);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.pd-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.pd-btn:hover { border-color: var(--oa-brand, #2563eb); color: var(--oa-brand, #2563eb); transform: translateY(-1px); }
.pd-btn:focus-visible { outline: 3px solid var(--oa-brand-glow, rgba(37, 99, 235, 0.35)); outline-offset: 2px; }
.pd-btn-primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, #1d4ed8, #2563eb 55%, #4f8df5); box-shadow: 0 14px 26px -14px rgba(37, 99, 235, 0.9); }
.pd-btn-primary:hover { color: #fff; border-color: transparent; box-shadow: 0 18px 30px -14px rgba(37, 99, 235, 0.95); }
.pd-link { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--oa-surface-soft, #f5f8fd); color: var(--oa-ink-soft, #3a4a66); font-size: 0.74rem; overflow-wrap: anywhere; text-align: left; user-select: all; }

.pd-qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pd-qr-box { width: 176px; height: 176px; padding: 8px; border-radius: 18px; background: #fff; border: 1px solid var(--oa-line, #dbe4f2); box-shadow: 0 14px 28px -20px rgba(15, 35, 85, 0.6); }
.pd-qr-box svg { display: block; width: 100%; height: 100%; }
.pd-qr figcaption { display: flex; align-items: center; gap: 6px; max-width: 190px; font-size: 0.74rem; line-height: 1.8; color: var(--oa-ink-faint, #64748b); text-align: center; }
.pd-qr figcaption svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--oa-brand, #2563eb); }

.pd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pd-steps li { display: flex; gap: 11px; padding: 14px; border-radius: 16px; background: var(--oa-surface-soft, #f5f8fd); border: 1px solid var(--oa-line-subtle, #e7eef8); }
.pd-steps b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; background: var(--oa-brand-soft, rgba(37, 99, 235, 0.1)); color: var(--oa-brand, #2563eb); font-size: 0.86rem; font-weight: 900; }
.pd-steps strong { display: block; margin-bottom: 3px; font-size: 0.86rem; color: var(--oa-ink, #0b1630); }
.pd-steps span { display: block; font-size: 0.76rem; line-height: 1.9; color: var(--oa-ink-faint, #64748b); }

.pd-details { border-radius: 16px; border: 1px solid var(--oa-line-subtle, #e7eef8); background: var(--oa-surface-soft, #f5f8fd); }
.pd-details summary { padding: 12px 16px; cursor: pointer; font-size: 0.84rem; font-weight: 800; color: var(--oa-ink, #0b1630); }
.pd-details[open] summary { border-bottom: 1px solid var(--oa-line-subtle, #e7eef8); }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 14px 16px 6px; }
.pd-grid span { display: block; font-size: 0.72rem; color: var(--oa-ink-faint, #64748b); }
.pd-grid strong { font-size: 0.84rem; color: var(--oa-ink, #0b1630); }
.pd-hash { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.pd-hash span { font-size: 0.72rem; font-weight: 800; color: var(--oa-ink-faint, #64748b); }
.pd-hash code { flex: 1; min-width: 0; font-size: 0.7rem; color: var(--oa-ink-soft, #3a4a66); overflow-wrap: anywhere; text-align: left; }
.pd-icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--oa-line, #dbe4f2); border-radius: 10px; background: var(--oa-surface, #fff); color: var(--oa-ink-soft, #3a4a66); cursor: pointer; flex-shrink: 0; }
.pd-icon-btn svg { width: 16px; height: 16px; }
.pd-icon-btn:hover { color: var(--oa-brand, #2563eb); border-color: var(--oa-brand, #2563eb); }
.pd-small { margin: 0; padding: 4px 16px 14px; font-size: 0.74rem; line-height: 1.9; color: var(--oa-ink-faint, #64748b); }

.pd-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 46px 20px; text-align: center; border-radius: 22px; background: var(--oa-surface, #fff); border: 1px dashed var(--oa-line, #dbe4f2); color: var(--oa-ink-soft, #3a4a66); }
.pd-empty > svg { width: 44px; height: 44px; color: var(--oa-brand, #2563eb); }
.pd-empty p { margin: 0; max-width: 360px; font-size: 0.84rem; line-height: 2; color: var(--oa-ink-faint, #64748b); }
.pd-empty.is-error > svg { color: var(--oa-danger, #dc2626); }

@media (max-width: 760px) {
    .pd-card { padding: 14px; }
    .pd-hero { flex-direction: column; align-items: flex-start; }
    .pd-main { grid-template-columns: 1fr; }
    .pd-steps { grid-template-columns: 1fr; }
}

/* inside the Android app itself the QR code is of no use: the page is already on the phone */
html.is-android-app .pd-qr { display: none; }
html.is-android-app .pd-main { grid-template-columns: 1fr; }
