/* ---- アップロードの進行・結果パネル（js/ui-feedback.js） ----
   画面のどこにいても目に入るよう下部に固定する。
   以前は #status の一言だけで、押したのに反応が無いように見えていた。 */

.pis-fb {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 14px 14px;
  border-top: 3px solid #999;
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  font-size: 0.9rem;
}

.pis-fb-busy { border-top-color: #2563eb; }
.pis-fb-ok { border-top-color: #16a34a; }
.pis-fb-info { border-top-color: #999; }
.pis-fb-error { border-top-color: #c0392b; }

.pis-fb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pis-fb-title {
  font-weight: bold;
  line-height: 1.4;
}

.pis-fb-busy .pis-fb-title { color: #1d4ed8; }
.pis-fb-ok .pis-fb-title { color: #15803d; }
.pis-fb-error .pis-fb-title { color: #c0392b; }

.pis-fb-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: -6px -6px 0 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #666;
  font-size: 1.2rem;
  line-height: 1;
}

.pis-fb-sub {
  margin-top: 4px;
  color: #555;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.pis-fb-hint {
  margin-top: 6px;
  color: #333;
  line-height: 1.5;
}

.pis-fb-bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
}

.pis-fb-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: #2563eb;
  transition: width 0.15s linear;
}

/* 進捗が数値で取れないあいだ（サーバー処理待ちなど）は流れる縞で「動いている」と示す */
.pis-fb-bar-fill.indeterminate {
  width: 100%;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.5) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.5) 75%,
    transparent 75%
  );
  background-size: 24px 24px;
  animation: pis-fb-stripes 0.8s linear infinite;
}

@keyframes pis-fb-stripes {
  from { background-position: 0 0; }
  to { background-position: 24px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pis-fb-bar-fill.indeterminate { animation: none; }
}

.pis-fb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pis-fb-btn {
  padding: 8px 14px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #333;
  color: #fff;
  font-size: 0.9rem;
}

.pis-fb-detail {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #666;
}

.pis-fb-detail summary {
  cursor: pointer;
  padding: 2px 0;
}

.pis-fb-detail-body {
  max-height: 30vh;
  margin: 6px 0;
  padding: 8px;
  border-radius: 4px;
  background: #f4f4f5;
  color: #333;
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  overflow: auto;
}

.pis-fb-copy {
  padding: 4px 10px;
  border: 1px solid #999;
  border-radius: 4px;
  background: #fff;
  font-size: 0.8rem;
}

/* パネルが一覧の最後の行を隠さないようにする */
body { padding-bottom: 180px; }
