/* "Move progress" panel (shared/transfer.js). Classes are prefixed tr- so they don't clash with the games. */

.tr-hide { display: none !important; }

.tr-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(60, 30, 95, .5);
  color: #4b2e6f;
  font-family: 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
}

.tr-panel {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 100%;
  overflow-y: auto;
  padding: 22px 20px 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 10px 0 #d9c8f5, 0 20px 50px rgba(60, 30, 95, .35);
  text-align: center;
}

.tr-panel h2 { margin: 0 44px 12px; font-size: 1.6rem; }

.tr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #f3ecff;
  color: #4b2e6f;
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.tr-view { display: none; flex-direction: column; gap: 12px; }
.tr-view.on { display: flex; }

.tr-note { margin: 0; color: #7d64a0; font-size: 1rem; line-height: 1.35; }
.tr-now { margin: 0; padding: 10px 14px; border-radius: 16px; background: #f8f3ff; font-weight: 600; }
.tr-big { margin: 6px 0; font-size: 1.45rem; font-weight: 700; }

.tr-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 10px 18px;
  border: none;
  border-radius: 20px;
  background: #f3ecff;
  color: #4b2e6f;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 0 #d9c8f5;
  -webkit-tap-highlight-color: transparent;
}
.tr-btn small { font-size: .85rem; font-weight: 500; opacity: .9; }
.tr-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #d9c8f5; }
.tr-pink { background: linear-gradient(180deg, #ff94c9, #ff5ea8); color: #fff; box-shadow: 0 5px 0 #d63d86; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.tr-sky { background: linear-gradient(180deg, #74c0fc, #4dabf7); color: #fff; box-shadow: 0 5px 0 #1c7ed6; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.tr-ghost { background: #fff; border: 2px solid #e9dcff; box-shadow: none; font-size: 1.05rem; min-height: 50px; }
.tr-small { flex: 1; font-size: 1.05rem; min-height: 50px; }

.tr-overlay button:focus-visible,
.tr-overlay label.tr-btn:focus-visible,
.tr-input:focus-visible { outline: 4px solid #ffd43b; outline-offset: 3px; }

.tr-row { display: flex; gap: 10px; }
.tr-row > * { flex: 1; }

.tr-qr { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.tr-qr svg { display: block; width: min(100%, 440px, 58vh); height: auto; border-radius: 12px; outline: 2px solid #efe6ff; }

.tr-cam { position: relative; overflow: hidden; border-radius: 20px; background: #2b1840; aspect-ratio: 4 / 3; }
.tr-cam video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tr-aim {
  position: absolute;
  inset: 12%;
  border: 4px dashed rgba(255, 255, 255, .85);
  border-radius: 18px;
  pointer-events: none;
}

.tr-status { margin: 0; min-height: 1.3em; font-weight: 600; }
.tr-status.bad { color: #d6336c; }

.tr-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.tr-btn { position: relative; }

.tr-paste { display: flex; gap: 8px; }
.tr-paste .tr-btn { flex: 0 0 auto; }
.tr-input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 8px 14px;
  border: 2px solid #e9dcff;
  border-radius: 16px;
  font: inherit;
  font-size: 1rem;
  color: #4b2e6f;
}

.tr-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.tr-compare div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 16px; background: #f8f3ff; }
.tr-compare div:first-child { background: #fff0f7; }
.tr-compare b { font-size: .9rem; color: #7d64a0; }
.tr-compare span { font-weight: 600; line-height: 1.4; }

@media (max-width: 420px) {
  .tr-compare { grid-template-columns: 1fr; }
  .tr-row { flex-direction: column; }
}
