﻿*, *::before, *::after {
    box-sizing: border-box;
}

.pm-wrapper {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

    .pm-wrapper.show {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px 16px;
    }

.pm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 31, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.pm-modal {
    margin:auto;
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 5px;
    box-shadow: 0 32px 80px rgba(0,0,0,.22), 0 8px 24px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.04);
    animation: pmSlideIn .42s cubic-bezier(.22,1,.36,1) both;
    overflow: hidden;
}

@keyframes pmSlideIn {
    from {
        opacity: 0;
        transform: translateY(32px) scale(.975);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    border: none;
    background: #f1f5f9;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, color .18s;
    z-index: 20;
    padding: 0;
    line-height: 1;
}

    .pm-close:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

.pm-progress {
    display: flex;
    gap: 8px;
    padding: 24px 32px 0;
}

.pm-step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-step-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pm-step-num {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: #e2e8f0;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, color .25s;
    flex-shrink: 0;
    position: relative;
}

.pm-step-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    transition: color .25s;
    white-space: nowrap;
}

.pm-step-bar {
    height: 3px;
    border-radius: 5px;
    background: #e2e8f0;
    width: 100%;
    transition: background .35s;
}

.pm-step-item.active .pm-step-num {
    background: #2563eb;
    color: #fff;
}

.pm-step-item.active .pm-step-label {
    color: #2563eb;
    font-weight: 600;
}

.pm-step-item.active .pm-step-bar {
    background: #2563eb;
}

.pm-step-item.completed .pm-step-num {
    background: #16a34a;
    color: #fff;
}

.pm-step-item.completed .pm-step-label {
    color: #16a34a;
}

.pm-step-item.completed .pm-step-bar {
    background: #16a34a;
}

.pm-divider {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 20px 0 0;
}

.pm-body {
    padding: 0 32px 32px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.pm-step {
    display: none;
}

    .pm-step.active {
        display: block;
        animation: stepFade .28s ease both;
    }

@keyframes stepFade {
    from {
        opacity: 0;
        transform: translateX(14px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pm-step-head {
    padding: 24px 0 20px;
    border-bottom: 1px solid #f1f5f9;
}

.pm-badge {
    display: inline-flex;
    align-items: center;
    background: #f0fdf4;
    color: #16a34a;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: .01em;
}

.pm-step-head h2 {
    font-size: 21px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.3;
    padding-right: 36px;
}

.pm-step-head p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
}

.pm-question-block {
    padding-top: 22px;
}

    .pm-question-block + .pm-question-block {
        padding-top: 20px;
        border-top: 1px solid #f1f5f9;
        margin-top: 6px;
    }

    .pm-question-block h4 {
        font-size: 15px;
        font-weight: 700;
        color: #0f172a;
        margin: 0 0 4px;
    }

.pm-sub-row {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.pm-sub {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.pm-select-all {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: color .18s;
}

    .pm-select-all:hover {
        color: #1d4ed8;
        text-decoration: underline;
    }

.pm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pm-card {
    border: 1.5px solid #e2e8f0;
    padding: 14px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color .18s, background .18s, box-shadow .18s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    user-select: none;
    background: #fff;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

    .pm-card strong {
        font-size: 13.5px;
        font-weight: 600;
        color: #1e293b;
        line-height: 1.35;
        transition: color .18s;
    }

    .pm-card span {
        font-size: 12px;
        color: #4d5259;
        line-height: 1.45;
        transition: color .18s;
    }

    .pm-card:hover {
        border-color: #93c5fd;
        background: #f8faff;
        box-shadow: 0 2px 10px rgba(37,99,235,.09);
    }

    .pm-card.selected {
        border-color: #2563eb;
        background: #eff6ff;
        box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    }

        .pm-card.selected strong {
            color: #1d4ed8;
        }

        .pm-card.selected span {
            color: #60a5fa;
        }

        .pm-card.selected::after {
            content: '\2713';
            position: absolute;
            top: 9px;
            right: 9px;
            width: 18px;
            height: 18px;
            background: #2563eb;
            color: #fff;
            border-radius: 5px;
            font-size: 10px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 18px;
            text-align: center;
        }

.pm-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.pm-card-full {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
}

.pm-radio-dot {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    flex-shrink: 0;
    transition: border-color .18s, background .18s, box-shadow .18s;
}

.pm-card-full.selected .pm-radio-dot {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: inset 0 0 0 3px #fff;
}

.pm-card-full.selected::after {
    display: none;
}

.pm-card-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pm-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.pm-btn {
    background: #0f172a;
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, transform .14s, box-shadow .18s;
    letter-spacing: .01em;
    white-space: nowrap;
    line-height: 1;
    font-family: inherit;
}

    .pm-btn:hover {
        background: #1e293b;
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(15,23,42,.22);
    }

    .pm-btn:active {
        transform: translateY(0);
        box-shadow: none;
    }

.pm-btn-outline {
    background: #fff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    padding: 11px 18px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .18s, color .18s, background .18s;
    white-space: nowrap;
    line-height: 1;
    font-family: inherit;
}

    .pm-btn-outline:hover {
        border-color: #94a3b8;
        color: #0f172a;
        background: #f8fafc;
    }

.pm-btn-full {
    width: 100%;
    text-align: center;
    padding: 14px 24px;
    border-radius: 5px;
    font-size: 15px;
    margin-top: 20px;
    display: block;
}

.pm-success {
    padding: 32px 16px 12px;
    text-align: center;
}

.pm-check-icon {
    width: 64px;
    height: 64px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.pm-success h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
}

.pm-success > p {
    font-size: 14px;
    color: #64748b;
    margin: 0 auto 20px;
    line-height: 1.65;
}

.pm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 22px;
}

.pm-tag {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 5px 13px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
}

.pm-changes-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 18px 20px;
    text-align: left;
    margin: 0 auto;
}

.pm-changes-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
}

.pm-changes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

    .pm-changes-list li {
        display: flex;
        align-items: flex-start;
        gap: 9px;
        font-size: 13px;
        color: #334155;
        line-height: 1.45;
    }

        .pm-changes-list li::before {
            content: '\2713';
            color: #16a34a;
            font-weight: 700;
            flex-shrink: 0;
        }

.pm-update-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 16px;
    margin-bottom: 0;
}

@media (max-width: 520px) {
    .pm-wrapper.show {
        padding: 0;
        align-items: flex-end;
    }

    .pm-modal {
        border-radius: 5px 5px 0 0;
        max-width: 100%;
    }

    .pm-progress, .pm-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .pm-grid {
        grid-template-columns: 1fr;
    }

    .pm-step-head h2 {
        font-size: 18px;
    }
}
