/* =========================================================
   HTML DROP IMPORT
   拖动 HTML 文件进入编辑器时的整页提示层
   ========================================================= */

.ts-html-drop {
    position: fixed;
    inset: 0;
    z-index: 1500000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    box-sizing: border-box;

    /* 仅作为视觉提示，不阻挡画布上的拖放 */
    pointer-events: none;

    opacity: 0;

    transition: opacity 0.16s ease;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Microsoft YaHei",
        Arial,
        sans-serif;
}


.ts-html-drop[hidden] {
    display: none;
}


.ts-html-drop.is-visible {
    opacity: 1;
}


/* =========================================================
   虚线边框
   ========================================================= */

.ts-html-drop::before {
    content: "";

    position: absolute;
    inset: 16px;

    border: 2px dashed rgba(129, 140, 248, 0.9);
    border-radius: 18px;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(99, 102, 241, 0.18),
            rgba(15, 23, 42, 0.55) 70%
        );

    backdrop-filter: blur(3px);

    box-shadow:
        inset 0 0 60px rgba(79, 70, 229, 0.35);
}


/* =========================================================
   面板
   ========================================================= */

.ts-html-drop-panel {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    max-width: 520px;

    padding: 34px 42px;

    box-sizing: border-box;

    border: 1px solid rgba(199, 210, 254, 0.5);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.96);

    box-shadow:
        0 28px 64px rgba(15, 23, 42, 0.3),
        0 4px 14px rgba(15, 23, 42, 0.16);

    text-align: center;

    transform: translateY(8px) scale(0.98);
    transition: transform 0.18s ease;
}


.ts-html-drop.is-visible .ts-html-drop-panel {
    transform: translateY(0) scale(1);
}


.ts-html-drop-icon {
    display: flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;

    margin-bottom: 4px;

    border-radius: 14px;

    background: linear-gradient(135deg, #6366f1, #a855f7);

    color: #ffffff;

    font-family: Consolas, "Courier New", monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;

    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.36);
}


.ts-html-drop-title {
    color: #111827;

    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.2px;
}


.ts-html-drop-subtitle {
    color: #4b5563;

    font-size: 13px;
    line-height: 1.6;
}


.ts-html-drop-note {
    padding: 5px 12px;

    border-radius: 999px;

    background: #fef3c7;

    color: #92400e;

    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.6;
}


/* =========================================================
   导入中
   ========================================================= */

.ts-html-drop.is-busy .ts-html-drop-icon {
    animation: tsHtmlDropPulse 1s ease-in-out infinite;
}


@keyframes tsHtmlDropPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 22px rgba(99, 102, 241, 0.36);
    }

    50% {
        transform: scale(1.06);
        box-shadow: 0 14px 30px rgba(99, 102, 241, 0.5);
    }

}


/* =========================================================
   响应式
   ========================================================= */

@media (max-width: 640px) {

    .ts-html-drop::before {
        inset: 10px;
    }

    .ts-html-drop-panel {
        padding: 26px 22px;
    }

    .ts-html-drop-title {
        font-size: 16px;
    }

    .ts-html-drop-subtitle {
        font-size: 12px;
    }

}


@media (prefers-reduced-motion: reduce) {

    .ts-html-drop,
    .ts-html-drop-panel {
        transition: none;
    }

    .ts-html-drop.is-busy .ts-html-drop-icon {
        animation: none;
    }

}
