/* NTP Client Downloads Portal — Public Styles */

.ntp-dl-portal {
    font-family: inherit;
    max-width: 100%;
}

/* ── Toolbar ── */
.ntp-dl-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.ntp-dl-search-wrap { flex: 1; min-width: 200px; }
.ntp-dl-filter-wrap { flex: 0 0 200px; }

.ntp-dl-search,
.ntp-dl-filter {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: #1e1e2e;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.ntp-dl-search:focus,
.ntp-dl-filter:focus {
    outline: none;
    border-color: #1955a8;
    box-shadow: 0 0 0 3px rgba(25,85,168,.12);
}
.ntp-dl-filter {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ── Category group ── */
.ntp-dl-category-group { margin-bottom: 36px; }
.ntp-dl-category-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    border-bottom: 1.5px solid #e5e7eb;
    padding-bottom: 8px;
    margin: 0 0 16px;
}

/* ── Cards grid ── */
.ntp-dl-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Individual card ── */
.ntp-dl-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    transition: border-color .18s, box-shadow .18s;
    width: 100%;
    box-sizing: border-box;
}
.ntp-dl-card:hover {
    border-color: #1955a8;
    box-shadow: 0 2px 10px rgba(25,85,168,.08);
}

/* ── File type icon block ── */
.ntp-dl-card-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff3fc;
    font-size: 0;
    flex-shrink: 0;
}
.ntp-dl-ext {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: #1955a8;
    line-height: 1;
}

/* Color-code icon by type */
.ntp-dl-icon-exe  .ntp-dl-ext,
.ntp-dl-icon-msi  .ntp-dl-ext,
.ntp-dl-icon-dmg  .ntp-dl-ext { color: #0a6b3d; }
.ntp-dl-icon-exe,
.ntp-dl-icon-msi,
.ntp-dl-icon-dmg { background: #ecfdf5; }

.ntp-dl-icon-bat  .ntp-dl-ext,
.ntp-dl-icon-cmd  .ntp-dl-ext,
.ntp-dl-icon-ps1  .ntp-dl-ext,
.ntp-dl-icon-sh   .ntp-dl-ext,
.ntp-dl-icon-vbs  .ntp-dl-ext { color: #7e3af2; }
.ntp-dl-icon-bat,
.ntp-dl-icon-cmd,
.ntp-dl-icon-ps1,
.ntp-dl-icon-sh,
.ntp-dl-icon-vbs { background: #f5f3ff; }

.ntp-dl-icon-pdf  .ntp-dl-ext { color: #c0392b; }
.ntp-dl-icon-pdf  { background: #fef2f2; }

.ntp-dl-icon-doc  .ntp-dl-ext,
.ntp-dl-icon-docx .ntp-dl-ext { color: #1852a4; }
.ntp-dl-icon-doc,
.ntp-dl-icon-docx { background: #eff3fc; }

.ntp-dl-icon-xlsx .ntp-dl-ext,
.ntp-dl-icon-csv  .ntp-dl-ext { color: #1a6b3a; }
.ntp-dl-icon-xlsx,
.ntp-dl-icon-csv  { background: #f0fdf4; }

.ntp-dl-icon-zip  .ntp-dl-ext,
.ntp-dl-icon-7z   .ntp-dl-ext,
.ntp-dl-icon-rar  .ntp-dl-ext,
.ntp-dl-icon-tar  .ntp-dl-ext,
.ntp-dl-icon-gz   .ntp-dl-ext { color: #92400e; }
.ntp-dl-icon-zip,
.ntp-dl-icon-7z,
.ntp-dl-icon-rar,
.ntp-dl-icon-tar,
.ntp-dl-icon-gz  { background: #fffbeb; }

/* ── Card body ── */
.ntp-dl-card-body {
    flex: 1;
    min-width: 0;
}
.ntp-dl-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ntp-dl-card-desc {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ntp-dl-card-meta {
    margin-top: 5px;
}
.ntp-dl-meta-size {
    font-size: 11px;
    color: #9ca3af;
    font-family: monospace;
}

/* ── Download button ── */
.ntp-dl-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 13px;
    background: #1955a8;
    color: #fff !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s, transform .1s;
    line-height: 1;
}
.ntp-dl-btn:hover {
    background: #134090;
    transform: scale(1.03);
}
.ntp-dl-btn svg {
    width: 15px;
    height: 15px;
}

/* ── Loading spinner ── */
.ntp-dl-loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}
.ntp-dl-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid #dde1e7;
    border-top-color: #1955a8;
    border-radius: 50%;
    animation: ntp-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes ntp-spin { to { transform: rotate(360deg); } }

.ntp-dl-empty {
    color: #9ca3af;
    text-align: center;
    padding: 40px;
    font-size: 15px;
    grid-column: 1 / -1;
}

/* External URL card icon */
.ntp-dl-icon-url {
    background: #fdf3f3;
}
.ntp-dl-icon-url svg {
    stroke: #c0392b;
    width: 20px;
    height: 20px;
}

/* "Get It" button variant for external links */
.ntp-dl-btn-url {
    background: #7e3af2;
}
.ntp-dl-btn-url:hover {
    background: #6c2bd9;
}

.ntp-dl-meta-ext {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .ntp-dl-toolbar { flex-direction: column; }
    .ntp-dl-filter-wrap { flex: 1 1 100%; }
    .ntp-dl-cards { grid-template-columns: 1fr; }
    .ntp-dl-btn { padding: 8px 10px; font-size: 12px; }
}

/* ── PIN Gate ── */
.ntp-dl-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 40px 20px;
}
.ntp-dl-gate-box {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
}
.ntp-dl-gate-logo svg {
    width: 48px;
    height: 48px;
    stroke: #1955a8;
    margin-bottom: 16px;
}
.ntp-dl-gate-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
}
.ntp-dl-gate-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 28px;
}
.ntp-dl-gate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ntp-dl-pin-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 18px;
    letter-spacing: 3px;
    text-align: center;
    border: 1.5px solid #dde1e7;
    border-radius: 10px;
    background: #f9fafb;
    color: #111827;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.ntp-dl-pin-input:focus {
    outline: none;
    border-color: #1955a8;
    box-shadow: 0 0 0 3px rgba(25,85,168,.12);
    background: #fff;
}
.ntp-dl-gate-error {
    color: #b91c1c;
    font-size: 13px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}
.ntp-dl-gate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #1955a8;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.ntp-dl-gate-btn:hover  { background: #134090; }
.ntp-dl-gate-btn:active { transform: scale(.98); }
.ntp-dl-gate-btn:disabled { opacity: .65; cursor: wait; }
.ntp-dl-gate-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.ntp-dl-gate-footer {
    margin: 24px 0 0;
    font-size: 12px;
    color: #9ca3af;
}

/* Lock link in toolbar */
.ntp-dl-logout-wrap { flex: 0 0 auto; }
.ntp-dl-logout-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    transition: border-color .15s, color .15s;
    white-space: nowrap;
}
.ntp-dl-logout-link:hover {
    border-color: #1955a8;
    color: #1955a8;
}
.ntp-dl-logout-link svg {
    width: 14px;
    height: 14px;
}

/* ── Card actions (download + copy) ── */
.ntp-dl-card-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}
.ntp-dl-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    background: transparent;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    white-space: nowrap;
    line-height: 1;
}
.ntp-dl-copy-btn:hover {
    border-color: #1955a8;
    color: #1955a8;
    background: #f0f4fc;
}
.ntp-dl-copy-btn.ntp-copy-success {
    border-color: #00a32a;
    color: #00a32a;
    background: #f0fdf4;
}
.ntp-dl-copy-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
