/* Progress bar for Node-backed multipage downloader. Prefixed .dw-* to avoid
   collisions with existing site styles. */

.dw-progress-container {
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    font-family: inherit;
}

.dw-progress-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.dw-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.dw-badge.dw-queued {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.dw-badge.dw-running {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.dw-badge.dw-done {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.dw-badge.dw-failed {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.dw-stage-label {
    font-size: 0.92rem;
    color: #1e293b;
    margin-bottom: 0.55rem;
    min-height: 1.3em;
    font-family: "JetBrains Mono", Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
    word-break: break-word;
}

.dw-progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.dw-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #2563eb);
    border-radius: 999px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.dw-progress-bar.active .dw-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.35) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0.35) 75%,
        transparent 75%,
        transparent
    );
    background-size: 22px 22px;
    animation: dw-progress-stripe 1.2s linear infinite;
}

@keyframes dw-progress-stripe {
    from { background-position: 0 0; }
    to   { background-position: 22px 0; }
}

@media (max-width: 600px) {
    .dw-progress-container { padding: 0.85rem 1rem; }
    .dw-stage-label { font-size: 0.85rem; }
}

/* === Wayback Machine block (auto-shown when URL is from Web Archive) === */
.wayback-block {
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(124,58,237,0.07), rgba(0,212,255,0.04));
    border: 1px solid rgba(124,58,237,0.35);
    border-radius: 10px;
    animation: wbSlideIn .2s ease-out;
}
@keyframes wbSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.wayback-badge {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7c3aed;
    font-weight: 700;
    margin-bottom: 8px;
}
.wayback-block label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}
.wayback-block input[type='text'] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
}
.wayback-block input[type='text']:focus {
    outline: none;
    border-color: #7c3aed;
}
.wayback-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}


/* === "Пробить кло" (cloak probe) block — matches the blue/slate downloader theme === */
.probe-content { margin-top: 1.5rem; }
.probe-content > p { margin-bottom: 0.5rem; }
.probe-kicker {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe;
    border-radius: 999px; padding: 5px 12px; margin-bottom: 12px;
}
#probe-form { margin-top: 1.25rem; }
#probe-form label { display: block; color: #0f172a; font-weight: 600; font-size: 0.98rem; margin: 0.9rem 0 0.4rem; }
#probe-form input[type="url"], #probe-form input[type="text"], #probe-form select {
    width: 100%; box-sizing: border-box; background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 0.9rem 1rem; font-size: 1rem; color: #0f172a; font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#probe-form select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475569' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.4rem; cursor: pointer;
}
#probe-form input:focus, #probe-form select:focus {
    outline: none; background: #ffffff; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}
.probe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.probe-field label { margin-top: 0.9rem; }
.probe-hint { margin: 8px 0 0; font-size: 12px; color: #6b7280; line-height: 1.45; }
.probe-hint code { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 5px; padding: 1px 5px; font-size: 11px; color: #1e293b; }
#probeSubmitBtn {
    display: block; width: 100%; margin-top: 1.15rem; background: #2563eb; color: #ffffff;
    border: none; border-radius: 12px; padding: 0.9rem 1.5rem; font-weight: 700; font-size: 1.02rem;
    cursor: pointer; box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
#probeSubmitBtn:hover { background: #1d4ed8; transform: translateY(-1px); }
#probeSubmitBtn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
#probeDownloadBtn { background: #22c55e; color: #ffffff; border: none; }
#probeDownloadBtn:hover { background: #16a34a; }
@media (max-width: 600px) { .probe-grid { grid-template-columns: 1fr; } }


/* ===== Design pass 1: font + collapsible probe + error box ===== */
html, body { font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Arial, sans-serif; }

.probe-collapsible { padding: 0; overflow: hidden; }
.probe-collapsible .probe-kicker { display: none; }
.probe-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%); color: #fff; border: 0; cursor: pointer;
  padding: 18px 22px; text-align: left; font-family: inherit; transition: filter .2s ease;
}
.probe-toggle:hover { filter: brightness(1.08); }
.probe-toggle:focus-visible { outline: 3px solid rgba(37,99,235,.45); outline-offset: 2px; }
.probe-toggle-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.probe-toggle-ico { font-size: 20px; opacity: .92; flex: 0 0 auto; }
.probe-toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.probe-toggle-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.probe-toggle-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .72; }
.probe-chevron { font-size: 15px; transition: transform .3s ease; flex: 0 0 auto; opacity: .85; }
.probe-collapsible:not(.is-collapsed) .probe-chevron { transform: rotate(180deg); }
.probe-body { max-height: 0; overflow: hidden; transition: max-height .4s ease; padding: 0 22px; }
.probe-collapsible:not(.is-collapsed) .probe-body { max-height: 1800px; }
.probe-lead { color: #475569; font-size: 15px; line-height: 1.6; margin: 16px 0 2px; max-width: 70ch; }
#probe-form { padding-bottom: 22px; }

.probe-error {
  margin: 2px 0 14px; padding: 12px 14px; border-radius: 10px; background: #fef2f2;
  border: 1px solid #fecaca; color: #991b1b; font-size: 14px; line-height: 1.45;
  display: flex; gap: 9px; align-items: flex-start;
}
.probe-error::before { content: "\f071"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #dc2626; flex: 0 0 auto; margin-top: 1px; }
@media (max-width: 600px) { .probe-toggle { padding: 15px 16px; } .probe-toggle-title { font-size: 17px; } .probe-body { padding: 0 16px; } }

/* fix: hide empty error box + left-align form text */
.probe-error[hidden] { display: none !important; }
.probe-lead, #probe-form .probe-hint { text-align: left; }

/* fix specificity: left-align lead+hint over .content p */
.probe-content .probe-lead, .probe-content .probe-hint { text-align: left; }

/* final polish */
.probe-content .probe-lead, .probe-content #probe-form .probe-hint { text-align: left !important; }
.probe-lead { margin: 14px 0 6px; }
.probe-toggle-tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ===== "Без прокси" option + disabled proxy block ===== */
.probe-noproxy-row {
    margin-top: 1.05rem; padding: 11px 14px; background: #f0f9ff;
    border: 1px solid #bae6fd; border-radius: 10px;
}
.probe-content .probe-noproxy-row label { font-weight: 600; color: #0f172a; cursor: pointer; }
.probe-proxy-block { transition: opacity .2s ease; margin-top: 0.2rem; }
.probe-proxy-block.is-disabled { opacity: .4; }
.probe-proxy-block.is-disabled input,
.probe-proxy-block.is-disabled select { cursor: not-allowed; }

/* ===== "Пробить клоаку" SEO article — readable left-aligned ===== */
.content.probe-seo { text-align: left; }
.content.probe-seo h2,
.content.probe-seo h3 { text-align: left; color: #0f172a; line-height: 1.25; }
.content.probe-seo h2 { font-size: 1.6rem; margin: 0 0 0.6rem; }
.content.probe-seo h3 { font-size: 1.18rem; margin: 1.6rem 0 0.5rem; }
.content.probe-seo p,
.content.probe-seo li { text-align: left; color: #334155; line-height: 1.62; font-size: 1rem; }
.content.probe-seo ul,
.content.probe-seo ol { margin: 0.5rem 0 0.8rem; padding-left: 1.4rem; }
.content.probe-seo li { margin-bottom: 0.45rem; }
.content.probe-seo li::marker { color: #2563eb; }
.content.probe-seo strong { color: #0f172a; font-weight: 700; }
@media (max-width: 600px) { .content.probe-seo h2 { font-size: 1.35rem; } }
