/* Path: T2Editor/plugin/paste_migrate/paste_migrate.css */

.t2-pm-overlay {
    z-index: 100050;
}

.t2-pm-modal {
    width: min(420px, 100%);
    max-width: 92vw;
    box-sizing: border-box;
    background: #fff;
    border-radius: 14px;
    padding: 24px 22px 20px;
    text-align: center;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
    animation: t2PmModalIn 0.18s ease;
}

@keyframes t2PmModalIn {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.t2-pm-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.t2-pm-icon .material-icons {
    color: #fff;
    font-size: 26px;
}

.t2-pm-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
}

.t2-pm-desc {
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #4b5563;
}

.t2-pm-url {
    max-width: 100%;
    padding: 9px 12px;
    margin: 0 0 16px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12.5px;
    font-family: 'Consolas', 'Monaco', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

/* ── 통합 리스트 모달 ─────────────────────────────────────────── */
.t2-pm-modal-list {
    width: min(480px, 100%);
}

.t2-pm-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 6px;
    max-height: min(260px, 40vh);
    overflow-y: auto;
    overflow-x: hidden;
    text-align: left;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    -webkit-overflow-scrolling: touch;
}

.t2-pm-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    border-radius: 8px;
    min-width: 0;
}

.t2-pm-row + .t2-pm-row {
    margin-top: 2px;
}

.t2-pm-row-icon {
    flex: 0 0 auto;
    font-size: 18px;
    color: #667eea;
}

.t2-pm-row-url {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12.5px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── 버튼 ────────────────────────────────────────────────────── */
.t2-pm-actions {
    display: flex;
    gap: 8px;
}

.t2-pm-btn {
    flex: 1;
    padding: 11px 14px;
    border: none;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease;
}

.t2-pm-btn:hover {
    filter: brightness(0.97);
}

.t2-pm-btn:active {
    transform: scale(0.98);
}

.t2-pm-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.t2-pm-btn-confirm {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

/* ── 반응형: 좁은 화면에서 텍스트/여백 축소 ───────────────────── */
@media (max-width: 420px) {
    .t2-pm-modal { padding: 20px 16px 16px; }
    .t2-pm-title { font-size: 15.5px; }
    .t2-pm-desc { font-size: 12.5px; }
    .t2-pm-row-url, .t2-pm-url { font-size: 11.5px; }
    .t2-pm-actions { flex-direction: column; }
}

/* ── 다크 모드 ───────────────────────────────────────────────── */
html[data-t2editor-theme="dark"] .t2-pm-modal {
    background: #1e1e2e;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

html[data-t2editor-theme="dark"] .t2-pm-title {
    color: #cdd6f4;
}

html[data-t2editor-theme="dark"] .t2-pm-desc {
    color: #a6adc8;
}

html[data-t2editor-theme="dark"] .t2-pm-url {
    background: #313244;
    color: #cdd6f4;
}

html[data-t2editor-theme="dark"] .t2-pm-list {
    background: #181825;
    border-color: #313244;
}

html[data-t2editor-theme="dark"] .t2-pm-row-url {
    color: #cdd6f4;
}

html[data-t2editor-theme="dark"] .t2-pm-btn-cancel {
    background: #313244;
    color: #cdd6f4;
}
