/* ===== SCANNED LIST STYLES ===== */
#scanned-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.empty {
  text-align: center;
  color: #777;
  font-style: italic;
}

.scanned-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.figure-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.figure-info img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--accent);
}

.figure-details h3 {
  margin: 0;
  font-size: 1.1em;
  color: var(--accent);
}

.figure-details p {
  margin: 3px 0 0;
  font-size: 0.95em;
}

.action-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

.confirm-btn,
.change-btn,
.delete-btn {
  flex: 1;
  padding: 8px 0;
  font-size: 1em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.confirm-btn {
  background: #4caf50;
  color: #fff;
}

.confirm-btn.confirmed {
  background: #9ccc65;
}

.change-btn {
  background: #ff6f61;
  color: #fff;
}

.delete-btn {
  background: #e53935;
  color: #fff;
}

.confirm-btn:active,
.change-btn:active,
.delete-btn:active {
  transform: scale(0.96);
}
/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 380px;
  background: var(--card-bg);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 51;
}

.modal.show {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.modal h3 {
  margin-top: 0;
  color: var(--accent);
  text-align: center;
  margin-bottom: 15px;
}

.modal-figure-list {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-figure-list .figure-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.modal-figure-list .figure-option span {
  margin: 0 auto;
}

.modal-figure-list .figure-option.selected {
  background: var(--accent);
  color: #fff;
}

.modal-figure-list img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.modal-actions button {
  flex: 1;
  margin: 0 5px;
  padding: 10px 0;
  font-size: 1em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s;
}

.modal-actions button:active {
  transform: scale(0.96);
}

#cancelChange {
  background: #ccc;
  color: #333;
}

#confirmChange {
  background: var(--accent);
  color: #fff;
}
