/* The tool, as in the mockup: a raised card under the hero. Built from the design system's tokens and zv-
   components (dropzone, notice, buttons, promo); what they lack is added here. Token names only. */

.mc-tool {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: var(--space-6);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-raised);
    box-shadow: var(--shadow-md);
}

.mc-link {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--accent-ink);
    text-decoration: underline;
    cursor: pointer;
}

    .mc-link:hover:not(:disabled) {
        text-decoration-thickness: 2px;
    }

    .mc-link:disabled {
        cursor: default;
        opacity: .6;
    }

    .mc-link:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

.mc-btn-lg {
    min-height: var(--control-lg);
}

.mc-tool .zv-btn .icon {
    width: 18px;
    height: 18px;
}

/* Choosing files ------------------------------------------------------------------------------------------- */

.mc-choose {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mc-drop {
    position: relative;
    flex-direction: column;
    flex-wrap: nowrap;
    min-height: 280px;
    padding: 32px var(--space-5);
    background: var(--surface-sunken);
    text-align: center;
    transition: border-color .15s, background-color .15s;
}

.mc-drop-active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.mc-drop-error {
    border-color: var(--danger);
}

.mc-drop-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    color: var(--accent-ink);
}

    .mc-drop-icon .icon {
        width: 26px;
        height: 26px;
    }

.mc-drop-title {
    font-size: 18px;
    font-weight: 700;
}

.mc-drop-button {
    pointer-events: none;
}

.mc-drop-limits {
    max-width: 520px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-muted);
}

.mc-samples {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-muted);
    text-align: center;
}

/* Busy ----------------------------------------------------------------------------------------------------- */

.mc-busy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    min-height: 280px;
    font-size: 17px;
    font-weight: 600;
}

.mc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-soft);
    border-top-color: var(--accent);
    border-radius: var(--radius-full);
    animation: mc-spin .9s linear infinite;
}

@keyframes mc-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mc-spinner {
        animation-duration: 3s;
    }

    .mc-drop {
        transition: none;
    }
}

/* Review --------------------------------------------------------------------------------------------------- */

.mc-review {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.mc-file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.mc-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--surface-sunken);
    color: var(--ink-muted);
    flex: 0 0 auto;
}

.mc-file-meta {
    flex: 1 1 240px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mc-file-name {
    font-size: 17px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.mc-file-kind {
    font-size: 14px;
    color: var(--ink-muted);
}

.mc-file .mc-link {
    font-size: 15px;
}

.mc-batch {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr));
    gap: var(--space-2);
}

    .mc-batch li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-2);
        min-height: 40px;
        padding: 6px 10px;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        background: var(--surface-sunken);
        font-size: 14px;
    }

.mc-batch-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.mc-badge-location {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 12px;
    font-weight: 700;
    color: var(--warning);
    flex: 0 0 auto;
}

.mc-found {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .mc-found h3 {
        font-size: 20px;
        font-weight: 700;
    }

    .mc-found p {
        font-size: 15px;
        line-height: 1.5;
        color: var(--ink-muted);
    }

.mc-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mc-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    padding: 14px var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-sunken);
    cursor: pointer;
}

.mc-item-on {
    border-color: var(--accent);
    background: var(--surface-field);
}

.mc-item:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.mc-item input {
    width: 20px;
    height: 20px;
    margin: 8px 0 0;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

    .mc-item input:focus-visible {
        outline: none;
    }

.mc-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    color: var(--ink-muted);
    flex: 0 0 auto;
}

.mc-item-on .mc-item-icon {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.mc-item-text {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mc-item-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    font-size: 16px;
    font-weight: 700;
}

.mc-why {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: var(--radius-full);
    border: 1px solid var(--warning-line);
    background: var(--warning-soft);
    color: var(--warning);
    font-size: 12px;
    font-weight: 700;
}

.mc-item-value {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.mc-map {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    align-self: flex-start;
    margin-top: 2px;
    font-size: 14px;
    font-weight: 600;
}

.mc-item-state {
    align-self: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-muted);
}

.mc-item-on .mc-item-state {
    font-weight: 700;
    color: var(--accent-ink);
}

.mc-track {
    margin: var(--space-2) 0 0 34px;
    padding: 12px var(--space-4) 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-field);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .mc-track legend {
        padding: 0 6px;
        font-size: 14px;
        font-weight: 700;
    }

.mc-track-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
}

    .mc-track-options label {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        min-height: var(--touch-min);
        font-size: 15px;
        cursor: pointer;
    }

    .mc-track-options input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: var(--accent);
    }

.mc-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.mc-note {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
    max-width: 560px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-muted);
}

    .mc-note .icon {
        margin-top: 2px;
    }

.mc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

/* Checked and cleaned ---------------------------------------------------------------------------------------- */

.mc-result {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.mc-result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-4);
}

    .mc-result-head > div {
        flex: 1 1 280px;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .mc-result-head h3 {
        font-size: 24px;
        font-weight: 700;
    }

    .mc-result-head p {
        font-size: 16px;
        line-height: 1.55;
        color: var(--ink-muted);
        overflow-wrap: anywhere;
    }

.mc-result-icon {
    width: 48px;
    height: 48px;
}

.mc-result-icon-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    color: var(--accent-ink);
    flex: 0 0 auto;
}

.mc-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: var(--space-4);
}

.mc-summary-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px var(--space-5);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-field);
    min-width: 0;
}

    .mc-summary-box ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
        font-size: 15px;
    }

    .mc-summary-box li {
        display: flex;
        gap: var(--space-2);
        align-items: center;
    }

.mc-summary-title {
    font-size: 15px;
    font-weight: 700;
}

.mc-summary-empty {
    font-size: 15px;
    color: var(--ink-muted);
}

.mc-summary-box .mc-ok {
    color: var(--success);
}

.mc-promo {
    padding: var(--space-4) 18px;
    background: var(--surface-field);
}

.mc-promo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

    .mc-promo-icon svg {
        width: 22px;
        height: 22px;
    }

.mc-promo-text {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-muted);
}

    .mc-promo-text strong {
        color: var(--ink);
    }

@media (max-width: 600px) {
    .mc-tool {
        padding: var(--space-5);
    }

    .mc-track {
        margin-left: 0;
    }

    .mc-actions .zv-btn {
        flex: 1 1 auto;
    }
}
