/* ================================================================
   PROGRESS MODAL — всплывающее окно с прогрессом поиска
   ================================================================
   Используется в index.html при поиске объекта.
   Состояния: loading / success / error.
   ================================================================ */

/* ─── Overlay ─────────────────────────────────────────────────── */
.progress-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 34, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.progress-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ─── Модалка ─────────────────────────────────────────────────── */
.progress-modal {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    padding: 40px 36px 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-modal-overlay.is-open .progress-modal {
    transform: translateY(0) scale(1);
}
.progress-modal::before {
    content: '';
    position: absolute;
    top: -150px; right: -150px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0, 184, 148, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transition: background 0.4s ease;
}
.progress-modal::after {
    content: '';
    position: absolute;
    bottom: -120px; left: -120px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(253, 203, 110, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ─── Состояние "ошибка" ──────────────────────────────────────── */
.progress-modal.is-error::before {
    background: radial-gradient(circle, rgba(231, 76, 60, 0.08) 0%, transparent 70%);
}

/* ─── Заголовок ───────────────────────────────────────────────── */
.progress-modal__head {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}
.progress-modal__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1e2e;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}
.progress-modal__subtitle {
    font-size: 0.85rem;
    color: #8a92a8;
}

/* ─── Круг ────────────────────────────────────────────────────── */
.progress-circle-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    z-index: 1;
}
.progress-circle-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}
.progress-circle-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.06);
    stroke-width: 10;
}
.progress-circle-fill {
    fill: none;
    stroke: url(#progressGradientModal);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 502.65;
    stroke-dashoffset: 502.65;
    transition: stroke-dashoffset 0.6s ease, stroke 0.4s ease;
}
.progress-modal.is-error .progress-circle-fill {
    stroke: #e74c3c;
}
.progress-circle-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.progress-percent {
    font-size: 2.4rem;
    font-weight: 800;
    color: #1a1e2e;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}
.progress-modal.is-error .progress-percent {
    color: #e74c3c;
}
.progress-percent small {
    font-size: 1rem;
    color: #4a5168;
    font-weight: 600;
    margin-left: 2px;
}
.progress-time {
    font-size: 0.75rem;
    color: #8a92a8;
    font-variant-numeric: tabular-nums;
}

/* ─── Стадия ──────────────────────────────────────────────────── */
.progress-stage {
    text-align: center;
    margin-bottom: 20px;
    min-height: 48px;
    position: relative;
    z-index: 1;
}
.progress-stage__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1e2e;
    margin-bottom: 3px;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.progress-modal.is-error .progress-stage__title {
    color: #c0392b;
}
.progress-stage__sub {
    font-size: 0.82rem;
    color: #4a5168;
    transition: opacity 0.3s ease;
}

/* ─── Подсказка ───────────────────────────────────────────────── */
.progress-tip {
    background: rgba(0, 184, 148, 0.06);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: 92px;
    margin-bottom: 20px;
    transition: opacity 0.4s ease, transform 0.4s ease, background 0.3s ease;
    position: relative;
    z-index: 1;
}
.progress-modal.is-error .progress-tip {
    background: rgba(231, 76, 60, 0.06);
}
.progress-tip__icon {
    font-size: 1.3rem;
    color: #fdcb6e;
    flex-shrink: 0;
    margin-top: 1px;
    transition: transform 0.4s ease, color 0.3s ease;
}
.progress-modal.is-error .progress-tip__icon {
    color: #e74c3c;
}
.progress-tip__text {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #4a5168;
}
.progress-tip__text strong {
    display: block;
    color: #1a1e2e;
    margin-bottom: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}
.progress-tip.is-changing {
    opacity: 0;
    transform: translateY(4px);
}
.progress-tip.is-changing .progress-tip__icon {
    transform: scale(0.85);
}

/* ─── Кнопки действий ─────────────────────────────────────────── */
.progress-modal__actions {
    display: none;
    position: relative;
    z-index: 1;
    flex-direction: column;
    gap: 10px;
}
.progress-modal__actions.is-visible {
    display: flex;
    animation: progressActionIn 0.4s ease;
}
@keyframes progressActionIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.btn-open-report {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #00b894, #00a381);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 60px;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 184, 148, 0.3);
    transition: all 0.2s ease;
}
.btn-open-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 184, 148, 0.4);
}
.btn-open-report i { font-size: 1.1rem; }

.btn-retry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 60px;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(231, 76, 60, 0.3);
    transition: all 0.2s ease;
}
.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(231, 76, 60, 0.4);
}
.btn-retry i { font-size: 1.1rem; }

.btn-close-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    color: #8a92a8;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    padding: 12px 28px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-close-modal:hover {
    color: #4a5168;
    border-color: rgba(0, 0, 0, 0.2);
}

/* ─── Мобильная адаптация ─────────────────────────────────────── */
@media (max-width: 576px) {
    .progress-modal {
        padding: 28px 22px 24px;
        border-radius: 20px;
    }
    .progress-modal__title { font-size: 1.15rem; }
    .progress-circle-wrap { width: 150px; height: 150px; }
    .progress-percent { font-size: 2rem; }
    .progress-tip { min-height: 80px; padding: 14px 16px; }
    .progress-tip__text { font-size: 0.82rem; }
}